如何修复 Ubuntu 20.04 中的 Sublime Text PPA?

如何修复 Ubuntu 20.04 中的 Sublime Text PPA?
$ sudo apt update && sudo apt upgrade -y
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                    
Hit:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                  
Hit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease                                                                                 
Hit:5 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease                                                                                   
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                     
Hit:7 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease                                                          
Hit:8 https://packages.microsoft.com/repos/ms-teams stable InRelease     
Hit:9 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease
Hit:10 http://ppa.launchpad.net/numix/ppa/ubuntu focal InRelease
Hit:11 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease
Hit:12 http://ppa.launchpad.net/papirus/papirus/ubuntu focal InRelease
Hit:13 http://ppa.launchpad.net/peek-developers/stable/ubuntu focal InRelease
Ign:14 http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu focal InRelease
Err:15 http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu focal Release
  404  Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

每当我尝试sudo apt update这样做时,它都会给我这个错误并退出,我不记得我是如何通过终端安装 sublime text 的,因为那是两周前的事了,有办法解决这个问题吗

我按照本教程从此标题下载了 sublime text https://www.codeproject.com/articles/582849/installingplussublimeplustextplus2plusonpluslinuxp

在 Linux Mint /Ubuntu 上安装 Sublime Text——更好的方法

我也尝试过卸载它,但没有用

$ sudo snap remove sublime-text
sublime-text removed

`

答案1

删除过时的 PPA

webupd8 PPA 自 2018 年起未更新,并且不支持 Ubuntu 20.04。

使用以下方法删除

sudo add-apt-repository --remove ppa:webupd8team/sublime-text-2

从官方存储库安装 Sublime Text 4

安装 sublime text 的说明可以在以下位置找到其网站

首先,安装 GPG 密钥:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

然后在 apt 中启用 https 源

sudo apt-get install apt-transport-https

对于稳定版本,输入命令

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

更新 apt 索引并安装 Sublime Text

sudo apt update
sudo apt install sublime-text

相关内容