[SOLVED] Can't install python2-certbot-apache to get a SSL certificate

Issues related to configuring your network
Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

[SOLVED] Can't install python2-certbot-apache to get a SSL certificate

Post by Fabien » 2022/05/23 13:28:57

Hello,

I'm new at webserver administration, and I met a problem.

1. My webserver provider opened me an account with a CentOS7 virtual machine, but no web server was installed.

2. I tried to install manually Apache, PHP, MySQL, ftp, etc. but I couldn't access the server via sFTP.

3. So, I tried to install VirtualMin. Apache and PHP worked well, but I really had sFTP issues.

4. Then, I installed cPanel. Though the installation process was successfull, I still cannot access the WHM interface.

5. Despite this problem, I managed the webserver via the GNU/Linux console - most of ot!

6. I want to get a SSL certificate following this tutorial: https://www.digitalocean.com/community/ ... r-centos-7. The epel-release installation worked fine.
I got this message (sorry, it's in French) :
[udirsernum@80-94-97-61 ~]$ sudo yum install python2-certbot-apache
[sudo] Mot de passe de udirsernum :
Modules complémentaires chargés : fastestmirror, langpacks, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 185.15.22.168
* cpanel-plugins: 185.15.22.168
* base: centos.mirrors.proxad.net
* centos-sclo-rh: fr2.rpmfind.net
* centos-sclo-sclo: centos.mirrors.proxad.net
* epel: fr2.rpmfind.net
* extras: centos.mirrors.proxad.net
* remi-php72: fr2.rpmfind.net
* remi-php73: fr2.rpmfind.net
* remi-safe: fr2.rpmfind.net
* updates: centos.mirrors.proxad.net
Résolution des dépendances
--> Lancement de la transaction de test
---> Le paquet python2-certbot-apache.noarch 0:1.11.0-1.el7 sera installé
--> Traitement de la dépendance : mod_ssl pour le paquet : python2-certbot-apache-1.11.0-1.el7.noarc
Le paquet 2:mod_ssl-2.4.6-97.el7.vm.4.x86_64 est rendu obsolète par ea-apache24-mod_ssl-2.4.53-2.2.2.cpanel.x86_64 qui est déjà installé
--> Résolution des dépendances terminée
Erreur : Paquet : python2-certbot-apache-1.11.0-1.el7.noarch (epel)
Requiert : mod_ssl
Disponible : 1:mod_ssl-2.4.6-95.el7.centos.x86_64 (base)
mod_ssl = 1:2.4.6-95.el7.centos
Disponible : 1:mod_ssl-2.4.6-97.el7.centos.x86_64 (updates)
mod_ssl = 1:2.4.6-97.el7.centos
Disponible : 1:mod_ssl-2.4.6-97.el7.centos.1.x86_64 (updates)
mod_ssl = 1:2.4.6-97.el7.centos.1
Disponible : 1:mod_ssl-2.4.6-97.el7.centos.2.x86_64 (updates)
mod_ssl = 1:2.4.6-97.el7.centos.2
Disponible : 1:mod_ssl-2.4.6-97.el7.centos.4.x86_64 (updates)
mod_ssl = 1:2.4.6-97.el7.centos.4
Disponible : 1:mod_ssl-2.4.6-97.el7.centos.5.x86_64 (updates)
mod_ssl = 1:2.4.6-97.el7.centos.5
Disponible : 2:mod_ssl-2.4.6-97.el7.vm.1.x86_64 (virtualmin)
mod_ssl = 2:2.4.6-97.el7.vm.1
Disponible : 2:mod_ssl-2.4.6-97.el7.vm.4.x86_64 (virtualmin)
mod_ssl = 2:2.4.6-97.el7.vm.4
Vous pouvez essayer d'utiliser --skip-broken pour contourner le problème
** 3 problèmes RPMDB préexistants trouvés, la sortie de « yum check » est la suivante :
postgrey-1.37-13.el7.noarch a des dépendances manquantes de postfix
python2-acme-1.11.0-1.el7.noarch a des dépendances manquantes de python-ndg_httpsclient
sssd-common-1.16.5-10.el7_9.12.x86_64 a des dépendances manquantes de libhttp_parser_strict.so.2()(64bit)
Any idea about how to install this package ?

Thanks!
Last edited by Fabien on 2022/08/23 09:21:53, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by TrevorH » 2022/05/23 14:44:29

I think the old phrase about "when you're in a hole, stop digging" might be appropriate here. I think you should probably abandon what you have now and start over since everything you've done so far has made it worse. We do not support cpanel or the machines that it is installed on and, from what I remember, to remove it you have to reinstall.

Cpanel has provided its own versions of the Apache http stack and it is incompatible with the CentOS supplied one. Unless they also supply a copy of certbot, then the one you are attempting to install wants the CentOS packages as pre-reqs and you already have newer versions of everything installed, supplied by cpanel. So you attempt to install certbot but it has a dependency on mod_ssl but your mod_ssl comes from cpanel and is called ea-apache24-mod_ssl so certbot cannot find the one it's looking for and refuses to install.

I'd recommend going back a to a vanilla CentOS without anything non-CentOS installed except the third party yum repo EPEL. Then ask again and we can attempt to try to fix the issues you had before you got to this point.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by Whoever » 2022/05/24 04:12:20

Fabien wrote:
2022/05/23 13:28:57


2. I tried to install manually Apache, PHP, MySQL, ftp, etc.
What do you mean by this?

Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by Fabien » 2022/05/30 08:41:53

Hello,

Thanks for you replies!

Uninstalling cPanel is one of my thoughts, as I feel it causes more problems than provides solutions!

@Whoever
I had installed the packages manually through yum, but maybe because I'm all new at web administration, it didn't work properly. That's why I tried to install Virtualmin then.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by TrevorH » 2022/05/30 10:23:37

I had installed the packages manually through yum, but maybe because I'm all new at web administration, it didn't work properly. That's why I tried to install Virtualmin then.
If you didn't get errors from yum then the install worked.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by Fabien » 2022/06/03 15:32:05

@TrevorH

Thanks for your reply. Indeed, I didn't get any error message, but even if I was the admin user of this webserver, I couldn't upload any file on it. When I installed cPanel, even if I still can't access the WHM, the sFTP worked.
I had a look to the cPanel uninstall procedure. It looks so complicated that most users advise to reinstall the CentOS. But, it's a virtual server on a provider's webserver, I don't know if I can reinstall CentOS via SSH !

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by Whoever » 2022/06/05 18:20:40

Fabien wrote:
2022/06/03 15:32:05
@TrevorH

But, it's a virtual server on a provider's webserver, I don't know if I can reinstall CentOS via SSH !
Set up a new virtual server and, when it is working properly, change the DNS to point to the new one.

Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by Fabien » 2022/06/07 13:30:44

@Whoever
Thanks for your reply!

I've never done any virtual installation, but as I don't have any access to my webhost VMWare(?), I don't think I can perform such an installation :-(

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by Whoever » 2022/06/07 20:52:07

Fabien wrote:
2022/06/07 13:30:44
@Whoever
Thanks for your reply!

I've never done any virtual installation, but as I don't have any access to my webhost VMWare(?), I don't think I can perform such an installation :-(
Ask your provider to set up a new VM for you. Or, if you are not actually providing any services yet, back up your VM and ask the provider to reset your VM back to its initial configuration, which won't include cPanel.

Fabien
Posts: 18
Joined: 2022/05/23 13:16:20

Re: Can't install python2-certbot-apache to get a SSL certificate

Post by Fabien » 2022/08/23 09:21:37

Hello,

I finally asked for a fresh installation of CentOS 7 and used yum to install all the web servers and services.

I eventually installed python2-certbot-apache and generated a SSL certificate.

Unfortunately, as it is a self-signed SSL certificate, the web browsers don't accept it. I will certainly have to have it generated by another source :-(

Thanks for your help anyway!

Post Reply