我的 Debian 服务器有点过时了(2018 年 2 月),现在我遇到了以下问题:
# apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
我的源都是 http 的,所以我想 apt-get 现在强制将一些转发到 https 源。
# cat /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ jessie main contrib non-free
deb http://ftp.de.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
# cat /etc/apt/sources.list.d/*
deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /
好的,然后安装 https:
# apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libcurl3-gnutls
The following NEW packages will be installed:
apt-transport-https libcurl3-gnutls
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 252 kB/390 kB of archives.
After this operation, 766 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
libcurl3-gnutls
Install these packages without verification? [y/N] y
Err http://security.debian.org/ jessie/updates/main libcurl3-gnutls amd64 7.38.0-4+deb8u9
404 Not Found [IP: 217.196.149.233 80]
E: Failed to fetch http://security.debian.org/pool/updates/main/c/curl/libcurl3-gnutls_7.38.0-4+deb8u9_amd64.deb 404 Not Found [IP: 217.196.149.233 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
有没有办法在没有最新存储库的情况下将 libcurl3-gnutls 安装到当前版本,而最新存储库又需要 libcurl3-gnutls?或者,是否可以强制 apt-get 在我更新所有内容之前不使用 SSL?
预先感谢您对此的任何提示。
答案1
罪魁祸首是这样的:
# cat /etc/apt/sources.list.d/*
deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /
ownCloud 下载服务器现在在所有情况下都会重定向到 TLS URL,apt
正如您所发现的那样。
为了能够更新和安装apt-transport-https
,您应该暂时禁用 ownCloud 存储库。您可以通过重命名适当的文件以使其具有 或 以外的扩展名来完成此.list
操作.sources
。