ubuntu下升级特定软件与查看软件版本信息

时间:2021-01-04 07:22:23

ubuntu 升级软件:

sudo apt-get update 更新源
  sudo apt-get upgrade 更新已安装的包
  sudo apt-get dist-upgrade 升级系统

ubuntu升级特定软件:

可以用   sudo apt-get  install pkgname

看软件安装位置:
dpkg -L xxxx

查看软件是否安装:
dpkg -l | grep filename

查看安装路径

dpkg -L 软件名

$  dpkg -L gedit
/.
/usr
/usr/share
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/gedit
/usr/share/gedit/gedit-bugreport
/usr/share/applications
/usr/share/applications/gedit.desktop
/usr/share/dbus-1
/usr/share/dbus-1/services
/usr/share/dbus-1/services/org.gnome.gedit.service
/usr/share/bug
/usr/share/bug/gedit
/usr/share/bug/gedit/script
/usr/share/pyshared
/usr/share/pyshared/gi
/usr/lib/gedit/girepository-1.0
/usr/lib/gedit/girepository-1.0/Gedit-3.0.typelib
/usr/lib/gedit/plugins/spell.plugin
/usr/lib/gedit/plugins/time.plugin
/usr/lib/gedit/plugins/zeitgeist.plugin
/usr/lib/gedit/plugins/snippets/substitutionparser.py
/usr/lib/gedit/plugins/snippets/windowactivatable.py
/usr/lib/libgedit-private.so.0.0.0
/usr/lib/python2.7
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/gi
/usr/lib/python2.7/dist-packages/gi/overrides
/usr/lib/libgedit-private.so.0
/usr/lib/python2.7/dist-packages/gi/overrides/Gedit.py

ubuntu查看软件版本:

首先安装软件,apt-show-versions 或者aptitude(信息比较详细,推荐)

1.使用dpkg 也可以

dpkg -l firefox
期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
| 状态=未安装(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)/触发器等待(W)/触发器未决(T)
|/ 错误?=(无)/须重装(R) (状态,错误:大写=故障)
||/ 名称         版本         描述
+++-==============-==============-============================================
ii  firefox        27.0.1+build1- Safe and easy web browser from Mozilla

2.安装 sudo apt-get installapt-show-versions

使用:

$ apt-show-versions firefox
      firefox/precise-security upgradeable from 27.0.1+build1-0ubuntu0.12.04.1 to        28.0+build2-0ubuntu0.12.04.1

3.安装 sudo apt-get install aptitude

使用:aptitude show firefox
软件包: firefox                 
状态: 已安装
自动安装: 否
版本号: 27.0.1+build1-0ubuntu0.12.04.1
优先级: 可选
部分: web
维护者: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
体系: i386
未压缩尺寸: 64.6 M
依赖于: lsb-release, libasound2 (>= 1.0.23), libatk1.0-0 (>=
           1.12.4), libc6 (>= 2.15), libcairo2 (>= 1.2.4),
           libdbus-1-3 (>= 1.0.2), libdbus-glib-1-2 (>=
           0.78), libfontconfig1 (>= 2.8.0), libfreetype6 (>=
           2.2.1), libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0
           (>= 2.22.0), libglib2.0-0 (>= 2.31.8), libgtk2.0-0
           (>= 2.24.0), libpango1.0-0 (>= 1.22.0),
           libstartup-notification0 (>= 0.8), libstdc++6 (>=
           4.6), libx11-6, libxext6, libxrender1, libxt6
推荐: xul-ext-ubufox, libcanberra0, libdbusmenu-glib4,
        libdbusmenu-gtk4
建议: ttf-lyx
冲突: gcu-plugin (<= 0.12.10-1ubuntu1)
破坏: abrowser (<= 4.0~b11+build3+nobinonly-0ubuntu1),
        abrowser-branding (<=
        4.0~b11+build3+nobinonly-0ubuntu1), adobe-flashplugin
        (<= 11.1.102.63-0precise1), firefox-branding (<=
        4.0~b11+build3+nobinonly-0ubuntu1),
        flashplugin-installer (<= 11.1.102.63ubuntu1)
代替: abrowser, abrowser-branding, firefox-branding,
        kubuntu-firefox-installer
提供: gnome-www-browser, iceweasel, www-browser
描述: Safe and easy web browser from Mozilla
 Firefox delivers safe, easy web browsing. A familiar user
 interface, enhanced security features including protection
 from online identity theft, and integrated search let you
 get the most out of the web.

附录:

 apt-cache search package 搜索包
  apt-cache show package 获取包的相关信息,如说明、大小、版本等
  sudo apt-get install package 安装包
  sudo apt-get install package - - reinstall 重新安装包
  sudo apt-get -f install 修复安装"-f = ——fix-missing"
  sudo apt-get remove package 删除包
  sudo apt-get remove package - - purge 删除包,包括删除配置文件等
  sudo apt-get update 更新源
  sudo apt-get upgrade 更新已安装的包
  sudo apt-get dist-upgrade 升级系统
  sudo apt-get dselect-upgrade 使用 dselect 升级
  apt-cache depends package 了解使用依赖
  apt-cache rdepends package 是查看该包被哪些包依赖
  sudo apt-get build-dep package 安装相关的编译环境
  apt-get source package 下载该包的源代码
  sudo apt-get clean && sudo apt-get autoclean 清理无用的包
  sudo apt-get check 检查是否有损坏的依赖

jpg 改 rar ubuntu下升级特定软件与查看软件版本信息