Certbot: Não é possível instalar python-certbot-nginx no Ubuntu 18.04 devido a 'dependências não atendidas'

Criado em 9 set. 2018  ·  18Comentários  ·  Fonte: certbot/certbot

Em uma instalação completamente nova e atualizada do Ubuntu 18.04.1 LTS (servidor), Certbot não pode ser instalado a partir do Certbot PPA. A instalação falha com 'dependências não atendidas'.

Estou seguindo as instruções em https://certbot.eff.org/lets-encrypt/ubuntuartful-nginx.

Segue-se uma conversa na linha de comando depois de fazer sudo add-apt-repository ppa:certbot/certbot e atualizar o cache do pacote 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.

Espero que a instalação deste pacote funcione ou, se não houver alguns pré-requisitos, talvez as instruções do Certbot devam mencioná-los. Obrigado!

debian / ubuntu documentation pkging bug

Comentários muito úteis

execute sudo add-apt-repository universe the sudo apt-get update e você pode instalar o certbot como as instruções

Todos 18 comentários

Obrigado por nos informar sobre este problema, @glts. @bmw , você tem alguma sugestão?

@schoen Agora acredito que isso se deve ao fato de os bionic , bionic-updates , bionic-security ) não estarem habilitados por padrão. Posso prosseguir depois de adicionar os repositórios do universo.

Nesse caso não é um bug, mas certamente uma dica nas instruções seria muito bem-vinda.

Eu tenho o mesmo problema, como resolver?

execute sudo add-apt-repository universe the sudo apt-get update e você pode instalar o certbot como as instruções

O mesmo comportamento está presente no debian stretch, recebo o seguinte erro:

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.

Devo abrir uma nova edição para isso?

Para Debian Gnu / Linux, a recomendação é usar backports, você pode fazer isso com uma conta 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 , você precisa incluir -t stretch-backports para que seu comando de instalação seja sudo apt-get install python-certbot-nginx -t stretch-backports . Veja https://certbot.eff.org/lets-encrypt/debianstretch-nginx para mais informações.

Para usuários do Ubuntu, esse problema deve ser resolvido com https://github.com/certbot/website/pull/382.

Estou tendo um problema semelhante depois de fazer recentemente apt-get dist-upgrade nos testes do Debian. removeu o certbot e não pode ser reinstalado.

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 não tem 'universo', tentar adicioná-lo resulta em:

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

qualquer conselho seria apreciado, obrigado!

@leeoniya verifique o comentário anterior de @bmw , você precisará instalar o backport do certbot no Debian Gnu / Linux

@ h3ct0rjs , você precisa incluir -t stretch-backports para que seu comando de instalação seja sudo apt-get install python-certbot-nginx -t stretch-backports . Veja https://certbot.eff.org/lets-encrypt/debianstretch-nginx para mais informações.

Para usuários do Ubuntu, esse problema deve ser resolvido com certbot / website # 382 .

Os usuários de Jessie não devem esquecer de mudar algumas linhas :)

Para Jessie, adicione esta linha à lista de fontes
deb http://ftp.debian.org/debian jessie-backports main
Para esticar adicione esta linha
deb http://ftp.debian.org/debian stretch-backports main

A instalação depende da sua versão do Debian:
sudo apt-get install python-certbot-nginx -t jessie-backports
ou
sudo apt-get install python-certbot-nginx -t stretch-backports

parece óbvio, mas apenas no caso;)

Olá, mesmo problema aqui com uma nova instalação do ubuntu 18.04 ... gostaria de saber se alguém encontrou uma solução para isso?
Eu tentei doc do site oficial
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository universe
$ sudo add-apt-repository ppa: certbot / certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-nginx

mas recebo um erro:
Os pacotes a seguir têm dependências não atendidas:
python-certbot-nginx: Depende: python3-certbot-nginx mas não vai ser instalado
E: Incapaz de corrigir os problemas, você segurou pacotes quebrados.

Oi de novo,
Encontrei o problema com a minha configuração, mas preciso da sua ajuda
Eu instalei o nginx da fonte e compilei do meu lado porque preciso de alguns módulos personalizados (como pagespeed e brotlib), então não posso usar o pacote apt para instalar o servidor nginx.
E porque eu bloqueio a atualização do Nginx no apt para evitar que ele sobrescreva esta versão personalizada (através de /etc/apt/preference.d/ => pacote: nginx *), quando tento instalar o seu "python-certbot_nginx", ele tenta instalo o pacote nginx e ele falha) ... Eu faço um teste e se eu permitir a instalação do pacote nginx o erro desaparece ... mas não quero validar esta instalação porque acho que isso apagará minha versão personalizada do O nginx e eu perderemos os módulos sutom compilados por mim.
Alguém pode me ajudar a encontrar uma solução para resolver este problema?
Muito obrigado por sua ajuda com antecedência !

@angelflo , eu recomendo fortemente que você poste em https://community.letsencrypt.org, onde há um grande grupo de pessoas familiarizadas com o projeto que ficariam felizes em tentar ajudá-lo.

sudo apt-get update
sudo apt-get install --only-upgrade python
sudo apt-get install python-pip
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
pip install pyopenssl
certbot certonly

Não recomendo instalar pacotes com pip fora de um ambiente virtual. Fazer isso faz com que os pacotes sejam misturados e substituam os pacotes fornecidos pelo seu gerenciador de pacotes do sistema operacional e pode resultar em um ambiente Python corrompido.

Não recomendo instalar pacotes com pip fora de um ambiente virtual. Fazer isso faz com que os pacotes sejam misturados e substituam os pacotes fornecidos pelo seu gerenciador de pacotes do sistema operacional e pode resultar em um ambiente Python corrompido.

Eu concordo, mas se não houver outra opção, então isso pode ser usado se houver uma necessidade séria. Usei esta opção no meu servidor e tudo funciona com sucesso.

Para qualquer outra pessoa com este problema e adicionar universe falhará porque já está adicionado e atualizado. Consegui resolver removendo universe (estava no final do meu arquivo) e, em seguida, descomentando manualmente os dois repositórios acima dele em /etc/apt/sources.list - que também incluem universe.

Mudança:

## 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

Para:

## 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

Em seguida, execute sudo apt-get update e a instalação deve funcionar.

No meu caso, o problema era que o espelho do Ubuntu da AWS aparentemente não inclui python3-mock etc. (WTF?)

Em /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

Pessoal eu tenho uma solução de ponta para isso.
TL; DR isso funciona, baby! https://certbot.eff.org/lets-encrypt/ubuntuother-nginx

Eu instalei o NGINX a partir de um build personalizado de origem e ele é de ponta. Eu tentei todas as soluções mencionadas
1 - Atualize seus repositórios para incluir o universo
2 - Experimente a opção de sinalizadores de backport
3 - Instale o Python

Nenhum deles funciona em uma nova instalação com @angristan nginx autointall source build

Depois de tentar de tudo, descobri que funcionava https://certbot.eff.org/lets-encrypt/ubuntuother-nginx

Esta página foi útil?
0 / 5 - 0 avaliações