Ubuntu上如何查询和安装指定版本的软件

转自:https://www.jianshu.com/p/87cccdab2d1f

Ubuntu上,安装某个软件包,不指定版本默认安装仓库中最新版本,有时,我们并不一定需要最新的版本,那么如何指定安装版本?

一、查询仓库中软件的所有版本

# apt-cache madison nginx

 

二、安装指定指定版本

语法:  apt-get install <<package name>>=<<version>>

#  apt-get  -y   install    nginx=1.14.2-1~xenial

 

# apt-cache policy nginx

 

 

 

使用apt-get install -s模拟安装软件

# apt-get install -s apache2

 

 

# apt-cache show nginx | grep -i version

 

三、参考

Ubuntu源列表

https://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8

Ubuntu: repository/PPA 源管理(查询、添加、修改、删除)

http://justcode.ikeepstudying.com/2018/01/ubuntu-repository-ppa-%E6%BA%90%E7%AE%A1%E7%90%86%EF%BC%88%E6%9F%A5%E8%AF%A2%E3%80%81%E6%B7%BB%E5%8A%A0%E3%80%81%E4%BF%AE%E6%94%B9%E3%80%81%E5%88%A0%E9%99%A4%EF%BC%89

Ubuntu通过apt-get安装指定版本和查询指定软件有多少个版本

https://www.cnblogs.com/EasonJim/p/7144017.html

How to list all packages from a repository in ubuntu / debian?

https://serverfault.com/questions/252333/list-all-packages-from-a-repository-in-ubuntu-debian

https://www.linuxuprising.com/2018/11/how-to-list-all-packages-in-repository.html

https://askubuntu.com/questions/220478/how-to-get-list-of-installable-packages-from-repositories



作者:Bogon
链接:https://www.jianshu.com/p/87cccdab2d1f
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
原文地址:https://www.cnblogs.com/begoogatprogram/p/15244381.html