5

I'm building my first debian package (django), which needs some dependencies, so I was wondering if it's possible to install a specific package version with apt-get.

For example instead of

pip install gunicorn==19.3.0

apt-get install gunicorn==19.3.0

(which obviously doesn't work, only apt-get install gunicorn works, however then it will install the latest version)

Ultimately, this is supposed into the Depends section of the control file.

Any ideas?

  • You can also use dpkg to install any downloaded version or see here on how to fake a version http://askubuntu.com/questions/18192/how-to-fake-a-package-version-installed – mchid May 28 '16 at 01:41
  • 19.3 does not seem to be available through apt-get unless you have a ppa which provides this version. – mchid May 28 '16 at 01:42

1 Answers1

11

Execute

man apt-get 

and go down (/) to the install function. This is worth reading.

By the way, did you try the following?

sudo apt-get install gunicorn=19.3.0

(one equal sign, not two)

As the man page states, use this feature with care. I don't know why you'd want an older version of a package on your installation but I'd guess that it would be a lot easier in the long run to change the dependent package to rely on the latest version of a dependency (gunicorn?) and not keep using an older version. Cleaner, IMO.

Richard Elkins
  • 474
  • 4
  • 7