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

Ric*_*ice 1 updates apt ppa sublime-text 20.04

$ sudo apt update && sudo apt upgrade -y\nHit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease\nHit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                    \nHit:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                  \nHit:4 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease                                                                                 \nHit:5 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease                                                                                   \nHit:6 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                     \nHit:7 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease                                                          \nHit:8 https://packages.microsoft.com/repos/ms-teams stable InRelease     \nHit:9 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal InRelease\nHit:10 http://ppa.launchpad.net/numix/ppa/ubuntu focal InRelease\nHit:11 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal InRelease\nHit:12 http://ppa.launchpad.net/papirus/papirus/ubuntu focal InRelease\nHit:13 http://ppa.launchpad.net/peek-developers/stable/ubuntu focal InRelease\nIgn:14 http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu focal InRelease\nErr:15 http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu focal Release\n  404  Not Found [IP: 91.189.95.85 80]\nReading package lists... Done\nE: The repository \'http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu focal Release\' does not have a Release file.\nN: Updating from such a repository can\'t be done securely, and is therefore disabled by default.\nN: See apt-secure(8) manpage for repository creation and user configuration details.\n
Run Code Online (Sandbox Code Playgroud)\n

每当我尝试sudo apt update这样做时,都会出现此错误并退出,我不记得两周前通过终端安装 sublime text 的方式,有没有办法解决这个问题

\n

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

\n
\n

在 Linux Mint /Ubuntu\xe2\x80\x93 上安装 Sublime Text 更好的方法

\n
\n

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

\n
$ sudo snap remove sublime-text\nsublime-text removed\n
Run Code Online (Sandbox Code Playgroud)\n

`

\n

Arc*_*ahi 5

删除过时的 PPA

webupd8 PPA 自 2018 年以来一直没有更新,并且不支持 Ubuntu 20.04。

将其删除

sudo add-apt-repository --remove ppa:webupd8team/sublime-text-2
Run Code Online (Sandbox Code Playgroud)

从其官方存储库安装 Sublime Text 4

安装 sublime text 的说明可以在其网站上找到。

首先,安装 GPG 密钥:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
Run Code Online (Sandbox Code Playgroud)

然后在apt中启用https源

sudo apt-get install apt-transport-https
Run Code Online (Sandbox Code Playgroud)

对于稳定版本,输入命令

echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Run Code Online (Sandbox Code Playgroud)

更新 apt 索引并安装 Sublime Text

sudo apt update
sudo apt install sublime-text
Run Code Online (Sandbox Code Playgroud)