Package versions in Launchpad PPA

Asked by Steve

In Ondrej Sury's packages there are several with the same package name but they are different versions. When I do apt-get install how do I specify the correct version?

The example Is:
Package Version
php-mysqlnd-ms 1.6.0+svn333622-3+ubuntu17.10.1+deb.sury.org+2 Ondřej Surý (2017-09-08)
php-mysqlnd-ms 1.6.0+svn333622-3+ubuntu17.04.1+deb.sury.org+2 Ondřej Surý (2017-09-08)
php-mysqlnd-ms 1.6.0+svn333622-3+ubuntu16.04.1+deb.sury.org+2 Ondřej Surý (2017-09-08)
php-mysqlnd-ms 1.6.0+svn333622-3+ubuntu14.04.1+deb.sury.org+2 Ondřej Surý (2017-09-08)

I am running Linux Mint 18.2 which is based on Ubuntu16.04 so I imagine I need to specify the correct version like this:
sudo apt-get install php-mysqlnd-ms1.6.0+svn333622-3+ubuntu16.04.1+deb.sury.org+2

This gives the error: E: Unable to locate package......

This does result in installation: sudo apt-get install php-mysqlnd-ms

But would this be the correct version for my operating system? I suspect it may not be the version I need because I am still experiencing difficulties with setting up a database.

It would be great to have some advice on this, Steve

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you contact the PPA maintainer directly you can alert them to this. It is their own PPA so they can have whatever they like on there.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#2

The main target of these PPAs is Ubuntu, and each of the versions that you listed is fitting to a certain Ubuntu release. The version string in Ondřej Surý's files indicates the Ubuntu release number that the package is for (14.04, 16.04, etc.)

You say that Linux Mint 18.2 is based on Ubuntu 16.04 (which has the codename Xenial Xerus). If you correctly define that version in your sources.list configuration file the package management will automatically select the right one.

If you have a line like
deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main
in one of your sources.list or sources.list.d/*.list configuration files, then only the version for your operating system will be selected, and not any other one.

Remark: If you would have checked the man pages for apt-get, you could have seen that there is a possibility to select a specific version of a package for installing with the syntax
sudo apt-get install pkg=pkg_version_number
in your case
sudo apt-get install php-mysqlnd-ms=1.6.0+svn333622-3+ubuntu16.04.1+deb.sury.org+2

Revision history for this message
Steve (greigsteve) said :
#3

Thanks Manfred Hampl, that solved my question.