无法在ubuntu 16.04.3上安装certbot

我正在尝试在我的ubuntu 16.04.3服务器上安装certbot,与16.04.2一样的命令将不会这样做.安装的 python认的 Python 2.7.12

这是安装脚本:

#!/bin/bash

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

这是输出

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: certbot (>= 0.17.0~) but it is not going to be installed
                        Depends: python-acme but it is not going to be installed
                        Depends: python-certbot but it is not going to be installed
                        Depends: python-mock but it is not going to be installed
                        Depends: python-openssl but it is not going to be installed
                        Depends: python-pkg-resources but it is not going to be installed
                        Depends: python-zope.interface but it is not going to be installed
                        Depends: python:any (< 2.8)
                        Depends: python:any (>= 2.7.5-5~)
E: Unable to correct problems,you have held broken packages.

如果我试试这个

sudo apt-get install python-pkg-resources

我明白了

The following packages have unmet dependencies:
 python-pkg-resources : Depends: python:any (< 2.8)
                        Depends: python:any (>= 2.7.5-5~)
E: Unable to correct problems,you have held broken packages

我已经尝试过了什么

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install -f
sudo apt-get install --reinstall python2.7

更多信息

$apt-cache policy python
python:
  Installed: 2.7.12-1
  Candidate: 2.7.12-1
  Version table:
 *** 2.7.12-1 100
        100 /var/lib/dpkg/status
     2.7.11-1 500
        500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
我知道这不能解决你的问题(对不起),但它可能会帮助别人.我遇到了同样的问题,并在 https://github.com/certbot/certbot/issues/5247中找到了解决方案 – 启用了Universe repo – add-apt-repository universe

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...