# NoInstallationError('Cannot find Apache executable apache2ctl',)

**URL:** <https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980>\
**Category:** Help\
**Created:** [July 16, 2019, 6:01pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980 "2019-07-16T18:01:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![JHBrewer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jhbrewer/32/33070_2.png) [@JHBrewer](https://community.letsencrypt.org/u/JHBrewer)\
**Post date:** [July 16, 2019, 6:01pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/1 "2019-07-16T18:01:04Z")

</div>

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](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: [jick.net](http://jick.net)

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

It produced this output: Installed 32 MB worth of new packages (mostly python34 stuff and died at the end with NoInstallationError(‘Cannot find Apache executable apache2ctl’,)

My web server is (include version): Apache (NOT Apache2. Apache2 is not provided by yum for SL6.x)

The operating system my web server runs on is (include version):Scientific Linus 6.x (a recompilation of RHEL 6.x, same as CentOS 6.x)

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, it’s my own server.

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): certbot 0.36.0

---

<div class="post-metadata">

**Author:** ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)\
**Post date:** [July 16, 2019, 6:03pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/2 "2019-07-16T18:03:38Z")

</div>

Hi @JHBrewer,

Certbot uses some distribution-specific information in order to figure out things like where to find your Apache installation. I’m guessing that it doesn’t know about Scientific Linux and so is using defaults that don’t properly apply to your environment.

@bmw, is there a straightforward way to edit the overrides in order to tell `certbot-auto` that this distro is like CentOS?

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [July 16, 2019, 7:04pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/3 "2019-07-16T19:04:01Z")

</div>

Unfortunately I’m not sure it’s super straightforward, but it should be workable.

@JHBrewer, for now you’ll need to set some of the CLI options that can be seen with `/usr/local/bin/certbot-auto --help apache`. I suspect you’ll at least need to add `--apache-server-root /etc/httpd --apache-ctl apachectl` to the command line.

To help us fix our Apache plugin’s automatic detection of the OS it’s run on though, I’d love it if you could run another command for me and provide me the output. That command is:

```auto
/opt/eff.org/certbot/venv/bin/python -c 'from certbot.util import get_os_info, get_systemd_os_like; print(get_os_info()); print(get_systemd_os_like())'

```

EDIT: `--apache-ctl` should be `apachectl` not `httpd` on RHEL 6 based systems.

---

<div class="post-metadata">

**Author:** ![JHBrewer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jhbrewer/32/33070_2.png) [@JHBrewer](https://community.letsencrypt.org/u/JHBrewer)\
**Post date:** [July 16, 2019, 8:13pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/4 "2019-07-16T20:13:31Z")

</div>

(‘Scientific Linux’, ‘6.10’)  
[’’]

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [July 16, 2019, 8:31pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/5 "2019-07-16T20:31:48Z")

</div>

Thanks @JHBrewer. I created [https://github.com/certbot/certbot/issues/7248](https://github.com/certbot/certbot/issues/7248) for us to track fixing automatic detection of Scientific Linux and [https://github.com/certbot/certbot/issues/7249](https://github.com/certbot/certbot/issues/7249) to improve the error messages here to better explain what is going on.

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [July 16, 2019, 8:56pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/6 "2019-07-16T20:56:48Z")

</div>

@JHBrewer, sorry for the 2nd message but I just noticed a mistake in the CLI flags I recommended you set. It should be:  
`--apache-server-root /etc/httpd --apache-ctl apachectl`  
Previously I had `--apache-ctl httpd`. I’ve edited my previous post to reflect this as well.

---

<div class="post-metadata">

**Author:** ![JHBrewer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jhbrewer/32/33070_2.png) [@JHBrewer](https://community.letsencrypt.org/u/JHBrewer)\
**Post date:** [July 17, 2019, 2:59pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/7 "2019-07-17T14:59:51Z")

</div>

Okay, but I’m a little confused: “–apache-server-root /etc/httpd --apache-ctl apachectl” looks like switches for some actual bash command, and I’m not sure which! Can you spell out the whole command for me?

---

<div class="post-metadata">

**Author:** ![cpu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/cpu/32/84514_2.png) [@cpu](https://community.letsencrypt.org/u/cpu)\
**Post date:** [July 17, 2019, 3:12pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/8 "2019-07-17T15:12:30Z")

</div>

I believe the complete command to run would be something like:

```auto
/usr/local/bin/certbot-auto --apache --apache-server-root /etc/httpd --apache-ctl apachectl

```

---

<div class="post-metadata">

**Author:** ![JHBrewer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jhbrewer/32/33070_2.png) [@JHBrewer](https://community.letsencrypt.org/u/JHBrewer)\
**Post date:** [July 17, 2019, 4:38pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/9 "2019-07-17T16:38:59Z")

</div>

Well, that seemed to work; however, there were error messages:

Cleaning up challenges  
File: /etc/apache2/le\_http\_01\_challenge\_pre.conf - Could not be found to be deleted

- Certbot probably shut down unexpectedly  
File: /etc/apache2/le\_http\_01\_challenge\_post.conf - Could not be found to be deleted
- Certbot probably shut down unexpectedly  
An unexpected error occurred:  
Traceback (most recent call last):

If you want to see it all, I can include a txt file if you tell me how.

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [July 18, 2019, 12:01am UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/10 "2019-07-18T00:01:17Z")

</div>

I assume Certbot crashed before it obtained a certificate for you? You can fix that problem by also adding `--apache-challenge-location /etc/httpd`. That will allow you to get a certificate but I just tested creating a setup similar to yours and Certbot failed to install the certificate because it’s not properly recognizing it’s on a RHEL 6 based system and trying to set SSL directives that are only available in newer versions of Apache.

Unfortunately there are not currently any options to control this behavior. I created another issue to track this problem at [https://github.com/certbot/certbot/issues/7255](https://github.com/certbot/certbot/issues/7255).

For now, I would recommend not using the Apache plugin on Scientific Linux 6. You can find instructions for how to use Certbot in this way at [https://certbot.eff.org/lets-encrypt/centos6-other](https://certbot.eff.org/lets-encrypt/centos6-other).

---

<div class="post-metadata">

**Author:** ![JHBrewer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jhbrewer/32/33070_2.png) [@JHBrewer](https://community.letsencrypt.org/u/JHBrewer)\
**Post date:** [July 18, 2019, 4:43pm UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/11 "2019-07-18T16:43:48Z")

</div>

Well, it certainly tried hard. I sheepishly admit that I don’t know how to tell if it succeeded. Where should I look for what file(s)? Everything I’ve looked for so far seems to be there.

I’m not sure what you mean by the Apache “plugin” – I have a full LAMP server here. Please don’t recommend that I “upgrade” to SL7 or SL8. I tried that, and was unable to compile any of my old fortran code. Similarly with “new, improved” PHP, MySQL and other essentials. When did “downward compatibility” become anathema??

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [July 19, 2019, 12:29am UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/12 "2019-07-19T00:29:17Z")

</div>

> [@JHBrewer](#):
>
> I sheepishly admit that I don’t know how to tell if it succeeded. Where should I look for what file(s)?

Are there directories containing certificates in `/etc/letsencrypt/live` and were your files in `/etc/httpd` modified to use those certificates? A decent way to search for the latter is a command like `grep -r '/etc/letsencrypt' /etc/httpd`.

> [@JHBrewer](#):
>
> I’m not sure what you mean by the Apache “plugin”

Sorry. This is Certbot jargon. Certbot has an Apache "plugin" that is included with certbot-auto and is normally able to automatically both obtain and configure a certificate for use with an Apache webserver. Unfortunately, many OSes have heavily customized their Apache setup so the code relies on properly detecting the distro it's run on. It appears this detection is broken on Scientific Linux 6 so assuming you didn't find that Certbot had properly modified your server above, this feature isn't going to work until we put out a release to fix the problem.

If your previous runs of `certbot-auto` didn't work, I recommend you follow the instructions at [https://certbot.eff.org/lets-encrypt/centos6-other](https://certbot.eff.org/lets-encrypt/centos6-other).

---

<div class="post-metadata">

**Author:** ![JHBrewer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jhbrewer/32/33070_2.png) [@JHBrewer](https://community.letsencrypt.org/u/JHBrewer)\
**Post date:** [July 19, 2019, 2:24am UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/13 "2019-07-19T02:24:08Z")

</div>

There is no live directory under /etc/letsencrypt/ and #grep -r ‘/etc/letsencrypt’ /etc/httpd draws a blank. Oh well, I guess I’ll follow the alternate path. Maybe not today…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [August 18, 2019, 2:24am UTC](https://community.letsencrypt.org/t/noinstallationerror-cannot-find-apache-executable-apache2ctl/97980/14 "2019-08-18T02:24:25Z")

</div>

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