在完全全新的Ubuntu 18.04.1 LTS(服务器)安装中,无法从Certbot PPA安装Certbot。 安装失败并显示“未满足的依赖项”。
我正在按照https://certbot.eff.org/lets-encrypt/ubuntuartful-nginx上的说明进行操作
完成sudo add-apt-repository ppa:certbot/certbot
并更新APT包缓存后,将进行命令行对话。
ubuntu<strong i="10">@pingu</strong>:~$ sudo apt-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu<strong i="11">@pingu</strong>:~$ sudo apt-get install python3-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-certbot-nginx : Depends: certbot (>= 0.25.0~) but it is not going to be installed
Depends: python3-acme but it is not going to be installed
Depends: python3-certbot (>= 0.25.0~) but it is not going to be installed
Depends: python3-mock but it is not installable
E: Unable to correct problems, you have held broken packages.
我希望此软件包的安装能够正常工作,或者如果我缺少一些先决条件,也许Certbot说明中应该提到它们。 谢谢!
感谢您让我们知道这个问题,@glts。 @bmw ,您有什么建议吗?
@schoen我现在认为这是由于默认情况下未启用Universe存储库( bionic
, bionic-updates
, bionic-security
)引起的。 添加Universe仓库后,我可以继续。
在这种情况下,这不是错误,但可以肯定的是,说明中的提示将非常受欢迎。
我有同样的问题,如何解决?
运行sudo add-apt-repository universe
sudo apt-get update
,您可以按照说明安装certbot
在debian Stretch中存在相同的行为,出现以下错误:
apt install python3-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-certbot-nginx : Depends: certbot (>= 0.25.0~) but 0.10.2-1 is to be installed
Depends: python3-acme (>= 0.26.0~) but 0.10.2-1 is to be installed
Depends: python3-certbot but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我应该为此开一个新书吗?
对于Debian Gnu / Linux,建议使用反向端口,您可以使用sudo帐户执行此操作:
echo "deb http://ftp.debian.org/debian stretch-backports main">>/etc/apt/sources.list
apt-get update && apt-get install certbot python3-certbot-nginx -t stretch-backports
ertbot --nginx -d domain.com
@ h3ct0rjs ,您需要包括-t stretch-backports
因此安装命令将为sudo apt-get install python-certbot-nginx -t stretch-backports
。 有关更多信息,请参见https://certbot.eff.org/lets-encrypt/debianstretch-nginx 。
对于Ubuntu用户,应该使用https://github.com/certbot/website/pull/382解决此问题
我最近在Debian测试中进行了apt-get dist-upgrade
后也遇到了类似的问题。 它删除了certbot,因此无法重新安装。
root<strong i="7">@localhost</strong>:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
python3-acme python3-configargparse python3-configobj python3-future python3-icu python3-josepy python3-mock python3-parsedatetime python3-pbr python3-requests-toolbelt python3-rf
python3.6 python3.6-minimal
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
certbot python3-certbot python3-zope.component python3-zope.hookable python3-zope.interface
The following NEW packages will be installed:
libpython3.7-minimal libpython3.7-stdlib python3.7 python3.7-minimal
The following packages will be upgraded:
binutils binutils-common binutils-x86-64-linux-gnu cargo cpp-8 g++-8 gcc-8 gcc-8-base gir1.2-glib-2.0 git git-man init init-system-helpers iptables iptables-persistent libasan5 li
libcryptsetup12 libfreetype6 libgcc-8-dev libgcc1 libgdbm-compat4 libgdbm6 libgirepository-1.0-1 libgomp1 libip4tc0 libip6tc0 libiptc0 libitm1 libllvm7 liblsan0 libmpx2 libnghttp2
libpython3-stdlib libquadmath0 libsqlite3-0 libssl1.0.2 libssl1.1 libstdc++-8-dev libstdc++6 libsystemd0 libtiff5 libtsan0 libubsan1 libudev1 libxtables12 linux-libc-dev netfilter
python3-reportbug reportbug stress-ng sudo systemd systemd-sysv sysvinit-utils udev unattended-upgrades vim vim-tiny xxd
68 upgraded, 4 newly installed, 5 to remove and 0 not upgraded.
Need to get 0 B/78.4 MB of archives.
After this operation, 22.0 MB of additional disk space will be used.
Do you want to continue? [Y/n]
debian没有“ universe”,尝试添加它会导致:
root<strong i="11">@localhost</strong>:~# add-apt-repository universe
Error: 'universe' invalid
root<strong i="14">@localhost</strong>:~# apt-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root<strong i="17">@localhost</strong>:~# apt-cache policy certbot
certbot:
Installed: (none)
Candidate: 0.28.0-1
Version table:
0.28.0-1 500
500 http://mirrors.linode.com/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
0.25.0-1+ubuntu17.10.1+certbot+1 500
500 http://ppa.launchpad.net/certbot/certbot/ubuntu artful/main amd64 Packages
root<strong i="20">@localhost</strong>:~# apt-cache policy python-certbot-nginx
python-certbot-nginx:
Installed: (none)
Candidate: 0.28.0-1
Version table:
0.28.0-1 500
500 http://mirrors.linode.com/debian unstable/main amd64 Packages
0.25.0-2+ubuntu17.10.1+certbot+1 500
500 http://ppa.launchpad.net/certbot/certbot/ubuntu artful/main amd64 Packages
root<strong i="23">@localhost</strong>:~# apt-cache policy python3-certbot-nginx
python3-certbot-nginx:
Installed: (none)
Candidate: 0.28.0-1
Version table:
0.28.0-1 500
500 http://mirrors.linode.com/debian unstable/main amd64 Packages
0.25.0-2+ubuntu17.10.1+certbot+1 500
500 http://ppa.launchpad.net/certbot/certbot/ubuntu artful/main amd64 Packages
任何建议,将不胜感激,谢谢!
@leeoniya检查由@bmw以前的评论,您将需要在Debian GNU / Linux的安装certbot反向移植
@ h3ct0rjs ,您需要包括
-t stretch-backports
因此安装命令将为sudo apt-get install python-certbot-nginx -t stretch-backports
。 有关更多信息,请参见https://certbot.eff.org/lets-encrypt/debianstretch-nginx 。对于Ubuntu用户,应使用certbot / website#382解决此问题。
杰西用户不应该忘记更改几行:)
对于jessie,将此行添加到源列表deb http://ftp.debian.org/debian jessie-backports main
对于拉伸添加此行deb http://ftp.debian.org/debian stretch-backports main
然后安装取决于您的Debian版本:
sudo apt-get install python-certbot-nginx -t jessie-backports
要么sudo apt-get install python-certbot-nginx -t stretch-backports
看起来很明显,但以防万一;)
嗨,这里是全新安装的ubuntu 18.04的问题...想知道是否有人为此找到了解决方案?
我尝试了官方网站的文档
$ sudo apt-get更新
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository Universe
$ sudo add-apt-repository ppa:certbot / certbot
$ sudo apt-get更新
$ sudo apt-get install python-certbot-nginx
但我收到错误:
以下软件包具有未满足的依赖性:
python-certbot-nginx:取决于:python3-certbot-nginx,但不会安装
E:无法纠正问题,您拿着破碎的包装。
你好,我们又见面了,
我发现配置有问题,但需要您的帮助
我已经从源代码安装了nginx并在我的身边编译了,因为我需要一些自定义模块(例如pagespeed和brotlib),所以我不能使用apt软件包来安装nginx服务器。
并且由于我阻止apt中的Nginx更新,以避免它覆盖此自定义版本(通过/etc/apt/preference.d/ =>软件包:nginx *),因此当我尝试安装“ python-certbot_nginx”时,它会尝试安装nginx软件包,它会失败)...我进行了测试,如果允许安装nginx软件包,错误消失了...但是我不想验证此安装,因为我认为它将删除我的自定义版本Nginx和我将放松自己编译的Sutom模块。
有人可以帮助我找到解决此问题的解决方案吗?
非常感谢您的提前帮助!
@angelflo ,我强烈建议您发布到https://community.letsencrypt.org ,那里有很多熟悉该项目的人,他们很乐意为您提供帮助。
sudo apt-get更新
sudo apt-get install --only-upgrade python
须藤apt-get install python-pip
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
点安装pyopenssl
certbot certonly
我不建议在虚拟环境之外安装pip
软件包。 这样做会使软件包与OS软件包管理器提供的软件包混合并覆盖它们,并可能导致Python环境损坏。
我不建议在虚拟环境之外安装
pip
软件包。 这样做会使软件包与OS软件包管理器提供的软件包混合并覆盖它们,并可能导致Python环境损坏。
我同意,但是如果没有其他选择,那么在非常需要它的情况下可以使用此方法。 我在服务器上使用了此选项,并且一切正常。
对于遇到此问题并添加universe
其他任何人,都会失败,因为它已经添加并且是最新的。 我能够通过删除Universe(位于文件末尾)来解决,然后手动取消注释/etc/apt/sources.list
位于其上方的两个存储库,其中也包括Universe。
更改:
## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
# deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse
# deb http://archive.ubuntu.com/ubuntu/ bionic-security main universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic universe
至:
## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-security main universe multiverse
然后运行sudo apt-get update
,安装应该可以进行。
就我而言,问题在于AWS的Ubuntu镜像显然不包括python3-mock等。(WTF?)
在/etc/apt/sources.list中:
# Fails:
deb http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ bionic main universe multiverse
# Succeeds:
deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse
伙计们,我对此有领先的解决方案。
TL; DR这行得通,宝贝! https://certbot.eff.org/lets-encrypt/ubuntuother-nginx
我从源自定义版本安装了NGINX,这是最前沿的。 我尝试了所有提到的解决方案
1-更新您的存储库以包含Universe
2-尝试使用backport标志选项
3-安装Python
这些都无法使用
在尝试了所有方法之后,我发现它可以正常工作https://certbot.eff.org/lets-encrypt/ubuntuother-nginx
最有用的评论
运行
sudo add-apt-repository universe
sudo apt-get update
,您可以按照说明安装certbot