apt-get “无法找到包”带有 glob

apt-get “无法找到包”带有 glob

我正在尝试卸载 Pantheon 桌面。我使用星号来卸载所有名称以“pantheon-”开头的软件包。

rolf@DRGMC01:~$ sudo apt-get remove pantheon-*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb
E: Couldn't find any package by glob 'pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb'
E: Couldn't find any package by regex 'pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb'

好的,那我们来安装缺少的包。

rolf@DRGMC01:~$ sudo apt-get install pantheon-debian-repos
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  pantheon-debian-repos
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 3,682 B of archives.
After this operation, 19.5 kB of additional disk space will be used.
Get:1 http://gandalfn.ovh/debian stretch-loki/main amd64 pantheon-debian-repos all 0.4-0+pantheon+stretch+loki1 [3,682 B]
Fetched 3,682 B in 0s (12.2 kB/s)                
Selecting previously unselected package pantheon-debian-repos.
(Reading database ... 180511 files and directories currently installed.)
Preparing to unpack .../pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb ...
Unpacking pantheon-debian-repos (0.4-0+pantheon+stretch+loki1) ...
Setting up pantheon-debian-repos (0.4-0+pantheon+stretch+loki1) ...
Importing pantheon-debian keyring
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package pantheon-debian-repos)
OK

也许现在?

rolf@DRGMC01:~$ sudo apt-get remove pantheon-*  --ignore-missing
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb
E: Couldn't find any package by glob 'pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb'
E: Couldn't find any package by regex 'pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb'

没有。是真的安装好了吗?

rolf@DRGMC01:~$ dpkg -l |grep '^ii  panth'
ii  pantheon-agent-polkit                    0.1.4-0+pantheon+stretch+loki1+r1               amd64        Polkit authorization designed for Pantheon
ii  pantheon-debian-repos                    0.4-0+pantheon+stretch+loki1                    all          Pantheon Debian Repository configuration
ii  pantheon-dpms-helper                     1:0.4.3.1+bzr235-0+pantheon+stretch+loki2       all          script and settings for X DPMS
ii  pantheon-mail                            1.0.6-0+pantheon+stretch+loki1+r1               amd64        Email client

  etc.

这里发生了什么?

  • 为什么 apt-get 看不到已安装的软件包?
  • 它为什么会关心这个包呢?

答案1

它看起来就像您pantheon-debian-repos_0.4-0+pantheon+stretch+loki1_all.deb在当前目录中一样,并且pantheon-*由 shell 扩展至此。

你需要的是:

sudo apt-get remove 'pantheon-*'

或者:

sudo apt-get remove "pantheon-*"

相关内容