Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux: How to install certain old version of a software via apt-get

I am trying to install the same versions of Apache, MySQL and PHP in my Linux PC (Raspberry Debian) as installed in my remote public server.

For instance, I'd like to install the last legacy release of the 2.2 branch, Apache/2.2.31.

apt-cache showpkg apache2

Output:

Package: apache2
Versions: 
2.4.10-10+deb8u4 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_jessie_main_binary-armhf_Packages)

But there isn't any information about the 2.2.31 version, neither in "Reverse Provides" section. I can do it by compiling from the sources, but it takes a lot of time. And I tried to find a reliable PPA or a reliable sources for deb packages, without any success.

How can I do it?

like image 737
Hookstark Avatar asked Oct 22 '25 14:10

Hookstark


1 Answers

If APT tracks the specific version you are looking for, (like Kyle said) then it's pretty easy.

sudo apt-get install <pkg_name>=<pkg_version>

or

sudo apt-get -t=<target_version> <pkg_name>

To see which packages are tracked, run

apt-cache showpkg <package_name> 

Unfortunately though, if a particular version is not managed by the APT, then you are out of luck using APT. It might be managed by some of the other package managers out there.

like image 166
saq7 Avatar answered Oct 25 '25 07:10

saq7



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!