安装和使用apt-show-versions ubuntu入门之十一

查看软件包版本号的工具

安装方法如下,遇到如下错误的时候首先解决错误

rlk@ubuntu:~$ sudo apt-get install apt-show-versions
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
rlk@ubuntu:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process
rlk@ubuntu:~$ sudo rm /var/lib/dpkg/lock -rf
rlk@ubuntu:~$ sudo rm /var/cache/apt/archives/lock -rf
rlk@ubuntu:~$ sudo rm /var/lib/apt/lists/lock -rf
rlk@ubuntu:~$ sudo dpkg --configure -a

解决错误重新安装

rlk@ubuntu:~$ sudo apt-get install apt-show-versions
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  apt-show-versions
0 upgraded, 1 newly installed, 0 to remove and 735 not upgraded.
Need to get 28.6 kB of archives.
After this operation, 93.2 kB of additional disk space will be used.
Get:1 http://mirrors.cn99.com/ubuntu bionic/universe amd64 apt-show-versions all 0.22.7ubuntu1 [28.6 kB]
Fetched 28.6 kB in 0s (144 kB/s)             
Selecting previously unselected package apt-show-versions.
(Reading database ... 226153 files and directories currently installed.)
Preparing to unpack .../apt-show-versions_0.22.7ubuntu1_all.deb ...
Unpacking apt-show-versions (0.22.7ubuntu1) ...
Setting up apt-show-versions (0.22.7ubuntu1) ...
** initializing cache. This may take a while **
Processing triggers for man-db (2.8.3-2) ...

测验

rlk@ubuntu:~$ sudo apt-show-versions gedit
gedit:amd64 not installed
gedit:i386 not installed
rlk@ubuntu:~$ gedit

Command 'gedit' not found, but can be installed with:

sudo apt install gedit

rlk@ubuntu:~$ sudo apt install gedit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  gedit-common
Suggested packages:
  gedit-plugins
The following NEW packages will be installed:
  gedit gedit-common
0 upgraded, 2 newly installed, 0 to remove and 735 not upgraded.
Need to get 545 kB of archives.
After this operation, 4,992 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.cn99.com/ubuntu bionic-updates/main amd64 gedit-common all 3.28.1-1ubuntu1.2 [137 kB]
Get:2 http://mirrors.cn99.com/ubuntu bionic-updates/main amd64 gedit amd64 3.28.1-1ubuntu1.2 [408 kB]
Fetched 545 kB in 0s (1,215 kB/s)
Selecting previously unselected package gedit-common.
(Reading database ... 226169 files and directories currently installed.)
Preparing to unpack .../gedit-common_3.28.1-1ubuntu1.2_all.deb ...
Unpacking gedit-common (3.28.1-1ubuntu1.2) ...
Selecting previously unselected package gedit.
Preparing to unpack .../gedit_3.28.1-1ubuntu1.2_amd64.deb ...
Unpacking gedit (3.28.1-1ubuntu1.2) ...
Processing triggers for gconf2 (3.2.6-4ubuntu1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Processing triggers for libglib2.0-0:amd64 (2.56.1-2ubuntu1) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Setting up gedit-common (3.28.1-1ubuntu1.2) ...
Setting up gedit (3.28.1-1ubuntu1.2) ...
update-alternatives: using /usr/bin/gedit to provide /usr/bin/gnome-text-editor (gnome-text-editor) in auto mode
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
rlk@ubuntu:~$ 
rlk@ubuntu:~$ sudo apt-show-versions gedit
gedit:amd64/bionic-updates 3.28.1-1ubuntu1.2 uptodate
gedit:i386 not installed
rlk@ubuntu:~$ 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值