Ubuntu通过apt-get安装指定版本和查询指定软件有多少个版本
2018-02-20 17:32
701 查看
一、通过apt-get安装指定版本
4000
ages.debian.org/unstable/aptitude/aptitude.8.en.html6、
apt-get install <<package name>>=<<version>>二、查询指定软件有多少个版本说明:在Linux用这个查询并不能完全的把所有版本都列举出来,因为每个版本都与系统版本和CPU架构有关,比如一个软件支持Ubuntu系统的16.04的CPU架构为amd64的版本只有1.0和1.2,其余都不支持,所以列举时就只有两款。列举版本列表:0、通过网站搜索:https://packages.ubuntu.com/1、
apt-cache madison <<package name>>将列出所有来源的版本。如下输出所示:
apt-cache madison vim vim | 2:7.3.547-1 | http://debian.mirrors.tds.net/debian/ unstable/main amd64 Packages vim | 2:7.3.429-2 | http://debian.mirrors.tds.net/debian/ testing/main amd64 Packages vim | 2:7.3.429-2 | http://http.us.debian.org/debian/ testing/main amd64 Packages vim | 2:7.3.429-2 | http://debian.mirrors.tds.net/debian/ testing/main Sources vim | 2:7.3.547-1 | http://debian.mirrors.tds.net/debian/ unstable/main Sources
madison是一个
apt-cache子命令,可以通过
man apt-cache查询更多用法。2、
apt-cache policy <<package name>>将列出所有来源的版本。信息会比上面详细一点,如下输出所示:
apt-cache policy gdb gdb: Installed: 7.7.1-0ubuntu5~14.04.2 Candidate: 7.7.1-0ubuntu5~14.04.2 Version table: *** 7.7.1-0ubuntu5~14.04.2 0 500 http://fr.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages 100 /var/lib/dpkg/status 7.7-0ubuntu3 0 500 http://fr.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
policy是一个
apt-cache子命令,可以通过
man apt-cache查询更多用法。3、
apt-cache showpkg <<package name>>4、
apt-get install -s <<package-name>>说明:这个命令只是模拟安装时会安装哪些软件列表,但不会例举出每个软件有多少个版本5、
aptitude versions <<package name>>参考:https://manp
4000
ages.debian.org/unstable/aptitude/aptitude.8.en.html6、
apt-show-versions -a <<package name>>说明:列举出所有版本,且能查看是否已经安装。还可以通过apt-show-versions -u <<package name>>来查询是否有升级版本。参考:http://manpages.ubuntu.com/manpages/trusty/man1/apt-show-versions.1p.html7、
whohas -d Debian,Ubuntu <<package name>> | tr -s ' ' '\t' | cut -f 1-3 | column -t8、
rmadison -u debian,ubuntu,bpo <<package name>> | cut -d "|" -f 1-3单个详情:1、
apt-cache show <<package name>>说明:查询指定包的详情,不管是否已经安装。2、
dpkg -l <<package name>>说明:效果和上面基本一致,但是结果是列表详情展示,会提示是否已经删除了之后还有依赖包没有删除等。3、
dpkg -s <<package name>>说明:必须是安装的包才能显示详情。4、
dpkg-query -s <<package name>>说明:同上,效果一致。使用技巧:1、可以在查询后面带上一些参数来实现筛选
apt-cache show package | grep Version
apt-show-versions | more参考:http://wiki.ubuntu.org.cn/Apt%E5%92%8Cdpkg%E5%BF%AB%E9%80%9F%E5%8F%82%E8%80%83(apt-get常用语法)https://superuser.com/questions/393681/how-to-find-out-which-versions-of-a-package-can-i-install-on-apthttps://stackoverflow.com/questions/18885820/how-to-check-the-version-before-install-packages-using-apt-gethttps://askubuntu.com/questions/340530/how-can-i-check-the-available-version-of-a-package-in-the-repositorieshttps://serverfault.com/questions/108080/ubuntu-debian-show-list-of-available-versions-of-a-specific-packagehttps://askubuntu.com/questions/473886/list-all-versions-of-a-packagehttps://askubuntu.com/questions/447/how-can-i-see-all-versions-of-a-package-that-are-available-in-the-archivehttp://www.wkii.org/view-package-version-ubuntu.html
相关文章推荐
- Ubuntu通过apt-get安装指定版本和查询指定软件有多少个版本
- 使用apt-get查询安装指定版本的软件
- ubuntu apt-get 安装指定版本软件
- Ubuntu下通过apt-get安装软件
- ubuntu中使用apt-get install时如何指定安装版本
- 老版本Ubuntu使用apt-get不能安装软件问题
- Ubuntu使用apt-get安装PHP指定版本
- ubuntu中使用apt-get install时如何指定安装版本
- ubuntu apt-get 安装软件包时 出现依赖的包版本过高
- Ubuntu 系统通过 Apt-get 在线安装软件
- Linux-----Ubuntu下apt-get安装软件包时依赖包版本过高
- ubuntu图下安装软件出现You might want to run 'apt-get -f install' to correct these解决
- [转] 如何在 Ubuntu 14.04 上通过 apt-get 安装 Apache Tomcat 7
- 卸载ubuntu下apt-get和setup.py安装的软件
- ubuntu apt-get和aptitude 安装软件包
- Ubuntu通过apt-get安装Oracle JDK
- Ubuntu中apt-get安装或更新软件错误的解决办法
- ubuntu通过apt-get安装JDK8
- ubuntu下用apt-get安装软件时网速太慢的解决办法
- ubuntu下安装软件出现You might want to run 'apt-get -f install' to correct these解决