1

I am currently building Ubuntu 16.04 server for our project. Error occurs when I'm trying to install:

sudo apt-get install php5-odbc php5-sybase tdsodbc

The error says: Unable to locate package php5-odbc Unable to locate package php5-sybase

I successfully installed it on my previous server which is Ubuntu 14.04. My question is, how can I install it to my latest server which is Ubuntu 16.04?

Any help will be much appreciated.

1 Answer 1

5

Those packages are available in Ubuntu 16.04 in php7.

Run this:

$ sudo apt install php7.0-odbc php7.0-sybase tdsodbc

While I wouldn't advise it unless you really need it. You can install php5 on 16.04 with:

$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install php5.6

That should also add the available php5 modules.

4
  • I successfully install after I run your first code above, but when I try to run my project, and still could not find driver. Do you have any ideas what to do next? Thanks
    – LeViNcE
    Oct 21, 2016 at 6:43
  • Please disregard my question above, I already fix my problem to that. Thanks for your answer. My system is now working. Cheers.
    – LeViNcE
    Oct 21, 2016 at 6:55
  • YOu're welcome... glad your problem i s resolved. Oct 21, 2016 at 7:13
  • For nowadays (2020) and php7.4-fpm, there are no sudo apt install php7.4-odbc, need to install 7.2... It is ok, or can be a big mess? Jun 25, 2020 at 22:18

You must log in to answer this question.

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