Let’s say you have multiple version of a package that are available and you want to install a specific one.
We will use ‘mysql-server-5.0′ package for our example:
remy@r12925:~$ apt-cache policy mysql-server-5.0
mysql-server-5.0:
Installed: (none)
Candidate: 5.0.32-7etch12
Version table:
5.0.32-7etch12 0
500 http://security.debian.org etch/updates/main Packages
5.0.32-7etch8 0
500 ftp://mir1.ovh.net etch/main Packages
5.0.32-7etch5 0
100 /var/lib/dpkg/status
You want to install bolded version of mysql-server-5.0 package.
Nothing easier!!
Simply run apt with following syntax:
apt-get install <package-name>=<version>
In our case, I would run “sudo apt-get install mysql-server-5.0=5.0.32-7etch8″
2 Comments: Trackback URL | Comments RSS
August 27th, 2010 at 10:19 am
What do you do if the version you want doesn’t show up in the apt-cache policy command?
August 27th, 2010 at 10:30 pm
you need to update /etc/apt/sources.list accordingly or to do it through gui interface, go to System / Administration / Software sources in ubuntu
3 Trackbacks