1

In summary I need to update unixODBC on the Elastic Beanstalk PHP instances, preferably using yum as it's quite easy to manage via .ebextensions.

  • AWS Linux: 64bit Amazon Linux 2017.03 v2.4.2 running PHP 7.0
  • Needed unixODBC: 2.3.1

sudo yum info unixODBC

Installed Packages
Name        : unixODBC
Arch        : x86_64
Version     : 2.2.14
Release     : 14.7.amzn1
Size        : 1.1 M
Repo        : installed
From repo   : amzn-main
Summary     : A complete ODBC driver manager for Linux
URL         : http://www.unixODBC.org/
License     : GPLv2+ and LGPLv2+
Description : Install unixODBC if you want to access databases through ODBC.
            : You will also need the mysql-connector-odbc package if you want to access
            : a MySQL database, and/or the postgresql-odbc package for PostgreSQL.

Available Packages
Name        : unixODBC
Arch        : i686
Version     : 2.2.14
Release     : 14.7.amzn1
Size        : 460 k
Repo        : amzn-main/2017.03
Summary     : A complete ODBC driver manager for Linux
URL         : http://www.unixODBC.org/
License     : GPLv2+ and LGPLv2+
Description : Install unixODBC if you want to access databases through ODBC.
            : You will also need the mysql-connector-odbc package if you want to access
            : a MySQL database, and/or the postgresql-odbc package for PostgreSQL.

I found 2 related posts for this here on serverfault but they no longer work. One suggested I disable yum priorities, which I did, but that did not change.

1
  • Amazon Linux package versions are often way out of date. Best option is to switch to Ubuntu if you can. Otherwise you may have to find a third party repository and do some yum priority configuration to go to that repository before the AWS repo.
    – Tim
    Aug 8, 2017 at 18:55

1 Answer 1

1

The unixODBC v2.3.1 is available as unixODBC-utf16.

Here are the shell commands as a user with sudo access:

curl -s https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/msprod.repo
sudo yum update
sudo yum info unixODBC*
sudo yum remove unixODBC*
sudo yum install unixODBC-utf16

See also: Install sqlcmd and bcp the SQL Server command-line tools on Linux.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .