需要重新安装 sublime-text 软件包,但我找不到它的档案?

需要重新安装 sublime-text 软件包,但我找不到它的档案?

我正在尝试删除 Sublime 3,但是出现错误:

$ sudo apt-get remove sublime-text-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package sublime-text needs to be reinstalled, but I can't find an archive for it.

我试过这个回答但仍然出现同样的错误:

$ sudo apt-get purge sublime-text
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package sublime-text needs to be reinstalled, but I can't find an archive for it.

$ sudo apt-get autoremove 正在读取软件包列表...完成 正在构建依赖关系树
正在读取状态信息...完成 E:需要重新安装软件包 sublime-text,但我找不到它的存档。

有任何想法吗?

我很好,Kubuntu 16.10。

编辑:

我中断了 Sublime 安装过程,这是否会导致此错误?

第一的:

$ sudo add-apt-repository ppa:webupd8team/sublime-text-3

Sublime Text 3 Installer: the package in this PPA downloads and installs the latest Sublime Text 3 beta builds.

For more info, see: http://www.webupd8.org/2013/07/sublime-text-3-ubuntu-ppa-now-available.html
 More info: https://launchpad.net/~webupd8team/+archive/ubuntu/sublime-text-3
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmp35ijqt87/pubring.gpg' created
gpg: /tmp/tmp35ijqt87/trustdb.gpg: trustdb created
gpg: key C2518248EEA14886: public key "Launchpad VLC" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
OK

然后:

$ sudo apt-get update

Hit:1 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu yakkety InRelease                                                                                                    
Hit:2 http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu yakkety InRelease                                                                                               
Get:3 http://security.ubuntu.com/ubuntu yakkety-security InRelease [102 kB]                                                                                                      
Hit:4 https://deb.opera.com/opera-stable stable InRelease                                                                 
Hit:5 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu yakkety InRelease                                                                   
Hit:6 https://deb.nodesource.com/node_6.x yakkety InRelease                                                                    
Hit:7 http://gb.archive.ubuntu.com/ubuntu yakkety InRelease                                                                                                                      
Get:8 http://gb.archive.ubuntu.com/ubuntu yakkety-updates InRelease [102 kB]
Hit:9 http://gb.archive.ubuntu.com/ubuntu yakkety-backports InRelease                                                                                                            
Fetched 204 kB in 2min 17s (1,486 B/s)                                                                                                                                           
Reading package lists... Done

然后:

$ sudo apt-get install sublime-text-installer

但是速度太慢所以我就结束了。

编辑2:

$ dpkg -l *sublime* | grep -i sublime
iHR sublime-text           3126             amd64        (no description available)
iHR sublime-text-installer 3126-2~webupd8~1 all          (no description available)

答案1

尝试以下步骤

  • 配置中断包sudo dpkg --configure -a
  • 修复损坏的依赖关系sudo apt --fix-broken install
  • 删除不需要的包sudo apt-get clean && sudo apt-get autoclean && sudo apt-get autoremove
  • 卸载 sublime-textsudo apt-get purge sublime-text

那就可以了。

答案2

如果这些软件包没有出现在 Synaptic 中(似乎您同时安装了 -2 和 -3 ppas),您可以在这里找到 .deb 文件...

https://launchpad.net/~webupd8team/+archive/ubuntu/sublime-text-3/+files/sublime-text-installer_3126-2~webupd8~1_all.deb

https://launchpad.net/~webupd8team/+archive/ubuntu/sublime-text-2/+files/sublime-text_2.0.2-1~webupd8~3_all.deb

...首先尝试第一个链接。

答案3

尝试

sudo dpkg --remove --force-all sublime-text

相关内容