
コマンドsudo apt-get update
またはを実行するたびにsudo apt upgrade
、次のエラー メッセージが表示されます。
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.
私は仮想マシン(virtualbox)で作業しています
答え1
ファイルが見つからないか、編集されているようですsources.list
。これは、Apt および関連プログラムがパッケージのダウンロード元を決定するために使用するファイルです。デフォルトでは、このファイルは にあります /etc/apt/sources.list
。
sources.list
以下に、バージョン16.04のファイルのデフォルトの内容を示します。ここ。
で始まる各行はdeb
、apt がバイナリ パッケージを取得するために使用する ppa/リポジトリを指します。stock ファイルでは、これらの各行のすぐ下に、ほぼ同じように見えるが で始まる別の行が続く必要がありますdeb-src
。これは、 が使用するソース コード パッケージapt source
が保存される場所です。これらの行は一緒に、 のコンテンツを提供しますapt-cache
。 を実行するとsudo apt update
、これらは Apt キャッシュが更新されるエンドポイントになります。apt を使用してコンテンツをダウンロードする場合、ここからコンテンツがダウンロードされます。
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
diff
これをファイルに保存して現在の と比較するとsources.list
、矛盾が生じると思います。提供された情報によると、コピーには を参照する行があるようですhttps://download.sublimetext.com/apt/stable/Packages
。エラーを修正する最も簡単な方法は、おそらくその行を見つけて、ハッシュタグ ('#') を行の先頭に追加します。何らかの理由でそのリポジトリをアクティブにしておく必要がある場合は、アップグレード後にハッシュタグを削除することで、いつでもこの手順を元に戻すことができます。(apt のアップグレード時にアップグレードによってファイルが書き換えられないことを前提としています。) ファイル内の 'deb' または 'deb-src' 行についても同様です。
保存後、以下を実行する必要があります。
sudo apt-get update
変更に気付きやすくなります。このファイルに加えた変更についても同様です。
これがうまくいかない場合は、'#'まだ追加されていない各行の先頭に追加し、その下に、上からストック コンテンツをコピーして、そのすぐ下に貼り付けます。
これにより、PPA が標準構成に戻り、アップグレード コマンドが修正されます。注意