Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using a server running with Ubuntu 12.04

I want to install the boost libraries in it. I know

sudo apt-get install libboost-all-dev

will make the work done, but it installs the latest version version 1.52 or above.

But I need to install the particular version 1.40 as there is a problem in a simulator which I am using for my academic purpose. What is the particular command for that so that I can install the boost libraries along with the other requirements for it like the linking files

In particular is there command to select the version like for gcc we can use

sudo apt-get install gcc-4.5 

Thanks in advance

share|improve this question

1 Answer 1

up vote 0 down vote accepted

First, determine the available versions you can install with the following command (use for packagename the name of the program that you want to install):

apt-cache showpkg [packagename]

Next, run the apt-get install command and specify the package version you want to install (use for version the version number previously determined of the program that you want to install):

sudo apt-get install [packagename]=[version]

After it's installed, run the following command to hold your installed version, preventing the package manager from automatically updating it in the future:

sudo echo "[packagename] hold" | sudo dpkg --set-selections

Source: How to Downgrade Packages on Ubuntu.

share|improve this answer
    
apt-cache is returning only libboost package 1.48 –  sai kiran grandhi Oct 5 '13 at 5:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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