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.

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.

  • 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 '16 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 '16 at 6:55
  • YOu're welcome... glad your problem i s resolved. – L. D. James Oct 21 '16 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? – Peter Krauss Jun 25 '20 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.