Receive error when running certbot-auto command

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: shibrequest-test.cit.cornell.edu/

I ran this command: sudo /usr/local/bin/certbot-auto certonly --apache

It produced this output:
Transaction Check Error:
file /usr/bin/python3.4 conflicts between attempted installs of python34-3.4.10-1.el6.i686 and python34-3.4.10-1.el6.x86_64
file /usr/bin/python3.4m conflicts between attempted installs of python34-3.4.10-1.el6.i686 and python34-3.4.10-1.el6.x86_64

Error Summary

Could not install OS dependencies. Aborting bootstrap!

My web server is (include version): Apache 2.2.31

The operating system my web server runs on is (include version): Centos 6.10

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): just followed the instruction from certbot site and downloaded it today.

Hi,

I think you’ve run into the exact case of the following github issue.
Pinging @bmw @schoen for more information…

Thank you

I tried sudo /usr/local/bin/certbot-auto certonly --apache --enablerepo=epel and received the same error.

-bash-4.1$ cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

It looks like you have the 32 bit version of Python 3 already installed, but yum is configured on your system to prefer the 64 bit version of packages. When Certbot runs yum install python34, it's getting this error saying that it cannot install Python 3.4 because another package conflicts.

If possible, I would run yum remove python34 but pay attention to what packages it's trying to remove. You may have installed other 32 bit packages on your system depending on 32-bit Python 3.4 that you don't want to remove. If it looks OK, after successfully running this command you should try running certbot-auto again.

If you cannot do that and you cannot configure yum to prefer/be satisfied by the 32 version of packages when certbot-auto runs a simple yum install python34, you'll need to manage OS dependencies for Certbot yourself. You can do this by installing the list of packages below and afterwards running certbot-auto with the --no-bootstrap flag. Doing this should not be preferred over the other options I described because it means that certbot-auto cannot help you install new dependencies in the future (such as a new version of Python since Python 3.4 is no longer maintained) and you'll have to do it yourself.

The names of the required OS packages on CentOS 6 are:

python34
python34-devel
python34-tools
gcc
augeas-libs
openssl
openssl-devel
libffi-devel
redhat-rpm-config
ca-certificates
mod_ssl

Thanks, no luck.
-bash-4.1$ sudo yum remove python34
Password for hy93@idm007:
Setting up Remove Process
No Match for argument: python34
citcentos-base/signature | 198 B 00:00
citcentos-base/signature | 3.6 kB 00:00 …
citcentos-base/primary_db | 6.6 MB 00:00
citcentos-debug/signature | 198 B 00:00
citcentos-debug/signature | 2.9 kB 00:00 …
citcentos-debug/primary_db | 545 kB 00:00
citcentos-extras/signature | 198 B 00:00
citcentos-extras/signature | 2.9 kB 00:00 …
citcentos-extras/primary_db | 56 kB 00:00
citcentos-fasttrack/signature | 198 B 00:00
citcentos-fasttrack/signature | 2.9 kB 00:00 …
citcentos-fasttrack/primary_db | 1.1 MB 00:00
citcentos-updates/signature | 198 B 00:00
citcentos-updates/signature | 2.9 kB 00:00 …
citcentos-updates/primary_db | 3.7 MB 00:00
citrpms/signature | 198 B 00:00
citrpms/signature | 2.9 kB 00:00 …
citrpms/primary_db | 35 kB 00:00
Package(s) python34 available, but not installed.
No Packages marked for removal

-bash-4.1$ sudo yum list installed | grep python
abrt-addon-python.x86_64 2.0.8-44.el6.centos
abrt-python.x86_64 2.0.8-44.el6.centos
at-spi-python.x86_64 1.28.1-2.el6.centos installed
cracklib-python.x86_64 2.8.16-4.el6 installed
dbus-python.x86_64 0.83.0-6.1.el6 installed
gamin-python.x86_64 0.1.10-9.el6 installed
gnome-python2.x86_64 2.28.0-3.el6 installed
gnome-python2-applet.x86_64 2.28.0-5.el6 installed
gnome-python2-bonobo.x86_64 2.28.0-3.el6 installed
gnome-python2-canvas.x86_64 2.28.0-3.el6 installed
gnome-python2-desktop.x86_64 2.28.0-5.el6 installed
gnome-python2-extras.x86_64 2.25.3-20.el6 installed
gnome-python2-gconf.x86_64 2.28.0-3.el6 installed
gnome-python2-gnome.x86_64 2.28.0-3.el6 installed
gnome-python2-gnomevfs.x86_64 2.28.0-3.el6 installed
gnome-python2-libegg.x86_64 2.25.3-20.el6 installed
gnome-python2-libwnck.x86_64 2.28.0-5.el6 installed
libproxy-python.x86_64 0.3.0-10.el6 installed
libuser-python.x86_64 0.56.13-8.el6_7 installed
python-crypto.x86_64 2.0.1-22.el6 installed
python-decorator.noarch 3.0.1-3.1.el6 installed
python-iniparse.noarch 0.3.1-2.1.el6 installed
python-iwlib.x86_64 0.1-1.2.el6 installed
python-matplotlib.x86_64 0.99.1.2-1.el6 installed
python-meh.noarch 0.12.1-3.el6 installed
python-nose.noarch 0.10.4-3.1.el6 installed
python-pip.noarch 7.1.0-1.el6 @epel
python-slip.noarch 0.2.20-1.el6_2 installed
python-slip-dbus.noarch 0.2.20-1.el6_2 installed
python-slip-gtk.noarch 0.2.20-1.el6_2 installed

Oh interesting!

I think it might be that you have yum configured to install both both architectures by default which apparently doesn’t work with the Python 3.4 packages.

Do you have a line like:

multilib_policy=all

in the file /etc/yum.conf?

Changing the line to

multilib_policy=best

might fix your problem. I was able to reproduce your issue and resolve it with this.

If that doesn’t work, in general, you need to configure yum on your system so yum install python34 works.

Thank you! I made the change as you suggested. Now python 3.4 is installed. But I’m getting another error:

Dependency Installed:

python-rpm-macros.noarch 0:3-14.el6
python-srpm-macros.noarch 0:3-14.el6
python3-rpm-macros.noarch 0:3-14.el6

python34-libs.x86_64 0:3.4.10-1.el6
python34-tkinter.x86_64 0:3.4.10-1.el6

Complete!

Traceback (most recent call last):

File “/tmp/tmp.BIncN8mJoC/fetch.py”, line 21, in

import ssl

File “/usr/local/lib/python3.7/ssl.py”, line 98, in

import _ssl
        # if we can't import it, let the error propagate

ModuleNotFoundError: No module named ‘_ssl’

WARNING: unable to check for updates.

Traceback (most recent call last):

File “”, line 16, in

File “/usr/local/lib/python3.7/distutils/version.py”, line 52, in lt

c = self._cmp(other)

File “/usr/local/lib/python3.7/distutils/version.py”, line 170, in _cmp

if self.version != other.version:

AttributeError: ‘StrictVersion’ object has no attribute ‘version’

It seems you also have a custom Python 3.7 installation in /usr/local which comes in your PATH before Python 3.4 which you just installed. This Python 3.7 installation seems to be broken as its failing to do things like import ssl which is part of the standard library. This may be due to your use of sudo clearing environment variables or the installation could be broken outright.

If you don’t need this Python 3.7 installation, I recommend removing it. Alternatively, you could fix the installation or remove /usr/local from your PATH environment variable before running Certbot.

Thanks! I removed Python 3.7. Now I’m getting error. I’m not sure how to setPYTHONHOME.

-bash-4.1$ sudo /usr/local/bin/certbot-auto --apache

Bootstrapping dependencies for RedHat-based OSes that will use Python3… (you can skip this with --no-bootstrap)

yum is /usr/bin/yum

yum is hashed (/usr/bin/yum)

Setting up Install Process

Package gcc-4.4.7-23.el6.x86_64 already installed and latest version

Package augeas-libs-1.0.0-10.el6.x86_64 already installed and latest version

Package openssl-1.0.1e-57.el6.x86_64 already installed and latest version

Package openssl-devel-1.0.1e-57.el6.x86_64 already installed and latest version

Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest version

Package redhat-rpm-config-9.0.3-51.el6.centos.noarch already installed and latest version

Package ca-certificates-2018.2.22-65.1.el6.noarch already installed and latest version

Package python34-3.4.10-1.el6.x86_64 already installed and latest version

Package python34-devel-3.4.10-1.el6.x86_64 already installed and latest version

Package python34-tools-3.4.10-1.el6.x86_64 already installed and latest version

Package 1:mod_ssl-2.2.15-69.el6.centos.x86_64 already installed and latest version

Nothing to do

/usr/local/bin/certbot-auto: line 289: [: not

not

setting

37: integer expression expected

/usr/local/bin/certbot-auto: line 1618: [: not

not

setting

37: integer expression expected

/usr/local/bin/certbot-auto: line 1789: [: not

not

setting

37: integer expression expected

Could not find platform independent libraries

Could not find platform dependent libraries <exec_prefix>

Consider setting $PYTHONHOME to [:<exec_prefix>]

Fatal Python error: initfsencoding: unable to load the file system codec

ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00007fadac71b700 (most recent call first):

WARNING: unable to check for updates.

Could not find platform independent libraries

Could not find platform dependent libraries <exec_prefix>

Consider setting $PYTHONHOME to [:<exec_prefix>]

Fatal Python error: initfsencoding: unable to load the file system codec

ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00007f557f1e4700 (most recent call first):

I think there may be remnants of your Python 3.7 installation still. Looks like certbot-auto is having trouble parsing python3 --version and that output includes multiple messages followed by something like Python 3.7.

I recommend fixing things up so python3 --version shows Python 3.4. You can run the command yourself to check if this works, although you may have to run sudo python3 --version to get the same environment as certbot-auto.

1 Like

Thank you very much for all your help. After cleanup, it works great.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.