Ubuntu 17。
我尝试过这个:
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx # doesn't exist
错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-certbot-nginx
更新:
请注意,这http:\\/\\/
意味着“http://”
这不起作用:
$ sudo apt-get update
Hit:1 http:\\/\\/ppa.launchpad.net/certbot/certbot/ubuntu yakkety InRelease
0% [1 InRelease gpgv 24.3 kB] [Connecting to mirrors.digitalocean.com (198.199.99.226
Hit:3 https://deb.nodesource.com/node_6.x yakkety InRelease
Ign:2 http:\\/\\/packages.erlang-solutions.com/debian yakkety InRelease
Ign:5 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety InRelease
Hit:4 http:\\/\\/packages.erlang-solutions.com/debian yakkety Release
Ign:7 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-updates InRelease
Ign:8 http:\\/\\/security.ubuntu.com/ubuntu yakkety-security InRelease
Err:9 http:\\/\\/security.ubuntu.com/ubuntu yakkety-security Release
404 Not Found [IP: 91.189.88.162 80]
Ign:10 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-backports InRelease
Err:11 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety Release
404 Not Found
Err:12 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-updates Release
404 Not Found
Err:13 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-backports Release
404 Not Found
Reading package lists... Done
E: The repository 'http:\\/\\/security.ubuntu.com/ubuntu yakkety-security Release' does no longer 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.
E: The repository 'http:\\/\\/mirrors.digitalocean.com/ubuntu yakkety Release' does no longer 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.
E: The repository 'http:\\/\\/mirrors.digitalocean.com/ubuntu yakkety-updates Release' does no longer 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.
E: The repository 'http:\\/\\/mirrors.digitalocean.com/ubuntu yakkety-backports Release' does no longer 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-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
software-properties-common is already the newest version (0.96.24.7.2).
The following packages were automatically installed and are no longer required:
python-acme python-certbot python-cffi-backend python-chardet
python-configargparse python-configobj python-cryptography python-dialog
python-enum34 python-funcsigs python-idna python-ipaddress python-mock
python-ndg-httpsclient python-openssl python-parsedatetime python-pbr
python-psutil python-pyasn1 python-pyicu python-requests python-rfc3339 python-six
python-tz python-urllib3 python-zope.component python-zope.event
python-zope.hookable python-zope.interface
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
$
$ sudo add-apt-repository ppa:certbot/certbot
This is the PPA for packages prepared by Debian Let's Encrypt Team and backported for Ubuntu(s).
More info: https://launchpad.net/~certbot/+archive/ubuntu/certbot
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox '/tmp/tmp53cbahkq/pubring.gpg' created
gpg: /tmp/tmp53cbahkq/trustdb.gpg: trustdb created
gpg: key 8C47BE8E75BCA694: public key "Launchpad PPA for certbot" imported
gpg: Total number processed: 1
gpg: imported: 1
OK
$ $ sudo apt-get update
$: command not found
$ sudo apt-get update
Hit:4 http:\\/\\/ppa.launchpad.net/certbot/certbot/ubuntu yakkety InRelease
Ign:1 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety InRelease
Ign:2 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-updates InRelease
Ign:3 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-backports InRelease
Err:5 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety Release
404 Not Found
Err:6 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-updates Release
404 Not Found
Err:7 http:\\/\\/lon1.mirrors.digitalocean.com/ubuntu yakkety-backports Release
404 Not Found
Ign:9 http:\\/\\/security.ubuntu.com/ubuntu yakkety-security InRelease
Hit:10 https://deb.nodesource.com/node_6.x yakkety InRelease
Ign:8 http:\\/\\/packages.erlang-solutions.com/debian yakkety InRelease
Err:11 http:\\/\\/security.ubuntu.com/ubuntu yakkety-security Release
404 Not Found [IP: 91.189.91.23 80]
Hit:12 http:\\/\\/packages.erlang-solutions.com/debian yakkety Release
Reading package lists... Done
E: The repository 'http:\\/\\/mirrors.digitalocean.com/ubuntu yakkety Release' does no longer 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.
E: The repository 'http:\\/\\/mirrors.digitalocean.com/ubuntu yakkety-updates Release' does no longer 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.
E: The repository 'http:\\/\\/mirrors.digitalocean.com/ubuntu yakkety-backports Release' does no longer 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.
E: The repository 'http:\\/\\/security.ubuntu.com/ubuntu yakkety-security Release' does no longer 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-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-certbot-nginx
答案1
在 Ubuntu 17.04 上尝试以下操作:
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-nginx
答案2
如果您已经为标准 ubuntu 存储库启用了“universe”:
deb http://archive.ubuntu.com/ubuntu/ artful universe
您不需要添加额外的 ppa。
$ apt show certbot
Package: certbot
Version: 0.17.0-2
Priority: extra
Section: universe/web
Source: python-certbot
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>