I am trying to install cerbot on my Ubuntu 16.04.4 server. I was having some trouble with python, so I removed all python versions from the system. I then downloaded the latest 3.8 release from Python.org, and ran
make
make install
However, when I try to run
sudo add-apt-repository ppa:certbot/certbot
I am getting an error telling me that the command cannot be found
sudo: add-apt-repository: command not found
So I then saw an answer to this - which is to install the software-properties-common package.
However doing so gives me this error,
nuser@nserver:~$ sudo apt install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
dh-python : Depends: python3:any (>= 3.3.2-2~)
python3-asn1crypto : Depends: python3:any (>= 3.3.2-2~)
python3-certifi : Depends: python3:any (>= 3.4~)
python3-chardet : Depends: python3:any (>= 3.3.2-2~)
Depends: python3-pkg-resources but it is not going to be installed
python3-debian : Depends: python3-six (> 1.4~) but it is not going to be installed
Depends: python3:any (>= 3.3.2-2~)
Recommends: python3-apt but it is not going to be installed
python3-idna : Depends: python3:any (>= 3.3.2-2~)
python3-linecache2 : Depends: python3:any (>= 3.3.2-2~)
python3-pip : Depends: python-pip-whl (= 8.1.1-2ubuntu0.4) but it is not going to be installed
Depends: python3:any (>= 3.4~)
Recommends: python3-dev (>= 3.2) but it is not going to be installed
python3-pycurl : Depends: python3 (< 3.6) but it is not going to be installed
Depends: python3 (>= 3.5~) but it is not going to be installed
python3-setuptools : Depends: python3-pkg-resources (= 33.1.1-1+certbot~xenial+1) but it is not going to be installed
Depends: python3:any (>= 3.3.2-2~)
python3-testresources : Depends: python3:any (>= 3.3.2-2~)
python3-traceback2 : Depends: python3:any (>= 3.3.2-2~)
python3-unittest2 : Depends: python3-pkg-resources but it is not going to be installed
Depends: python3-six (>= 1.4) but it is not going to be installed
Depends: python3:any (>= 3.3.2-2~)
python3-update-manager : Depends: python3:any (>= 3.3.2-2~)
Depends: python3-apt (>= 0.8.5~) but it is not going to be installed
Depends: python3-distupgrade but it is not going to be installed
Depends: lsb-release but it is not going to be installed
python3-wheel : Depends: python3:any (>= 3.3.2-2~)
software-properties-common : Depends: python3:any (>= 3.3.2-2~)
Depends: python3 but it is not going to be installed
Depends: python3-gi but it is not going to be installed
Depends: gir1.2-glib-2.0 but it is not going to be installed
Depends: python-apt-common (>= 0.9) but it is not going to be installed
Depends: python3-dbus but it is not going to be installed
Depends: python3-software-properties (= 0.96.20.10) but it is not going to be installed
ufw : Depends: python3:any (>= 3.3.2-2~)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Any help would be great.
python(orpython3) is not wise, and you should return it back to it's default. You can add a second python version if required. Also note a fully upgraded Ubuntu 16.04 will report 16.04.7, so your system is badly behind (>2 years) on upgraded packages (and thus hopefully not online) – guiverc Sep 01 '20 at 01:13python3package? If so, you might have seriously broken your system as apt itself relies on thepython3package being present. Never do amake installon python, always domake localinstallwhich leaves the system Python intact. – Brian Turek Sep 01 '20 at 05:28python-minimalpackage (usingdpkg) and fix without re-install... You may need to do more than just this though – guiverc Sep 01 '20 at 22:32apt-get -f installworks and reinstalls python3. If it does, you should be safe :) – Brian Turek Sep 02 '20 at 04:30