我正在关注官方指令安装 Sublime text 3 但安装时出现如下错误sudo apt-get update
:
Ign:10 https://download.sublimetext.com apt/stable/ InRelease
Hit:12 https://packagecloud.io/github/git-lfs/ubuntu xenial InRelease
Ign:13 https://download.sublimetext.com apt/stable/ Release
Ign:14 https://download.sublimetext.com apt/stable/ Packages
Ign:15 https://download.sublimetext.com apt/stable/ Translation-en_US
Ign:16 https://download.sublimetext.com apt/stable/ Translation-en
Ign:14 https://download.sublimetext.com apt/stable/ Packages
Ign:15 https://download.sublimetext.com apt/stable/ Translation-en_US
Ign:16 https://download.sublimetext.com apt/stable/ Translation-en
Ign:14 https://download.sublimetext.com apt/stable/ Packages
Ign:15 https://download.sublimetext.com apt/stable/ Translation-en_US
Ign:16 https://download.sublimetext.com apt/stable/ Translation-en
Ign:14 https://download.sublimetext.com apt/stable/ Packages
Ign:15 https://download.sublimetext.com apt/stable/ Translation-en_US
Ign:16 https://download.sublimetext.com apt/stable/ Translation-en
Ign:14 https://download.sublimetext.com apt/stable/ Packages
Ign:15 https://download.sublimetext.com apt/stable/ Translation-en_US
Ign:16 https://download.sublimetext.com apt/stable/ Translation-en
Err:14 https://download.sublimetext.com apt/stable/ Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Ign:15 https://download.sublimetext.com apt/stable/ Translation-en_US
Ign:16 https://download.sublimetext.com apt/stable/ Translation-en
Reading package lists... Done
W: The repository 'https://download.sublimetext.com apt/stable/ Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://download.sublimetext.com/apt/stable/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
E: Some index files failed to download. They have been ignored, or old ones used instead.
我在 Google 上搜索了一段时间,但找不到适合我的解决方案。任何帮助我都感激不尽!
我的环境是 Ubuntu 16.04 x86_64,KDE plasma
我的
/etc/apt/sources.list.d/sublime-text.list
文件:
deb https://download.sublimetext.com/ apt/stable/
- 我的
apt-transport-https
和ca-certificates
是:
apt-transport-https is already the newest version (1.2.32).
ca-certificates is already the newest version (20170717~16.04.2).
- 输出
apt-key list
:
...
pub 4096R/8A8F901A 2017-05-08
uid Sublime HQ Pty Ltd <[email protected]>
sub 4096R/BD3DF454 2017-05-08
答案1
正确的 CA 证书应该已经包含在您的软件包中,因此很可能有人弄乱了它。运行sudo dpkg-reconfigure ca-certificates
并确保mozilla/DST_Root_CA_X3.crt
已选中。除非您有非常充分的理由不这样做,否则应该选择每个证书。如果该证书未出现在列表中,则重新安装软件包:sudo apt install --reinstall ca-certificates