I am using Debian(buster)I would like to download a specific version of a package. To accomplish this I added the required repository to the system and ran the apt-get update command. Also I use 'apt-cache-madison "package-name" to verify that the package i need it available and it does show up. So when i run the command to install the package "apt-get install 'package'='version_number' " it says that the Version 'the version i specified' was not found for 'package'. Any suggestions?
You need to check the package for the availability before :
apt policy <package> apt-cache madison <package> apt list -a <package>
If the desired version isn't available, that's mean the package cannot be installed.
Here is an example:
~$ apt policy linux-image-amd64 linux-image-amd64: Installed: (none) Candidate: 4.19+105+deb10u8 Version table: 5.9.6-1~bpo10+1 100 100 http://deb.debian.org/debian buster-backports/main amd64 Packages 100 /var/lib/dpkg/status 4.19+105+deb10u8 500 500 http://deb.debian.org/debian buster/main amd64 Packages 4.19+105+deb10u7 500 500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
From the output 3 version are allowed to be installed
5.9.6-1~bpo10+1. To simulate the installation:
sudo apt install -s linux-image-amd64=4.19+105+deb10u7
You can target the package version with the repository name.
Assuming your package is in Testing, you can use
apt-get install <package>/testing
apt-get install <package> -t testing
The first command only installs the corresponding package, the second one installs both package and dependencies from testing
Be sure to read about "FrankenDebian" (these advises apply for every Linux distribution) before installing packages from another repo