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

安装和使用apt-show-versions ubuntu入门之十一,第1张

安装和使用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:~$ 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5720109.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-18

发表评论

登录后才能评论

评论列表(0条)

保存