# Getting “Error: couldn't get currently installed version for letsencrypt” when trying to renew my certificates

**URL:** <https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031>\
**Category:** Help\
**Created:** [February 3, 2017, 3:25am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031 "2017-02-03T03:25:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![parrker](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/parrker/32/10998_2.png) [@parrker](https://community.letsencrypt.org/u/parrker)\
**Post date:** [February 3, 2017, 3:25am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/1 "2017-02-03T03:25:41Z")

</div>

I ran this command: certbot-auto

It produced this output:  
Error: couldn’t get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt:  
An unexpected error occurred:  
VersionConflict: (certbot 0.11.1 (/root/.local/share/letsencrypt/lib/python2.7/site-packages), Requirement.parse(‘certbot==0.10.2’))  
Please see the logfile ‘certbot.log’ for more details.

My operating system is (include version): Ubuntu 15.04

My web server is (include version): nginx/1.6.2 (Ubuntu)

My hosting provider, if applicable, is: Rackspace

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

---

<div class="post-metadata">

**Author:** ![toadalskii](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@toadalskii](https://community.letsencrypt.org/u/toadalskii)\
**Post date:** [February 3, 2017, 8:19am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/2 "2017-02-03T08:19:25Z")

</div>

I am getting similar error just runned a cerbot --expand

**A certbot update taken place as soon as i run the expand command following upgrade message shows up(given below) in console after this error started coming:**

Upgrading certbot-auto 0.10.2 to 0.11.1…  
Replacing certbot-auto…  
Creating virtual environment…  
Installing Python packages…  
Installation succeeded.  
Traceback (most recent call last):  
File “/root/.local/share/letsencrypt/bin/letsencrypt”, line 7, in   
from certbot.main import main  
File “/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/certbot/main.py”, line 11, in   
import zope.component  
File “/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/zope/component/ **init**.py”, line 16, in   
from zope.interface import Interface

**Error Message :**  
Error: couldn’t get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt

My operating system is: Linux AMI

My web server is : nginx

My hosting provider is: AWS

---

<div class="post-metadata">

**Author:** ![serverco](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/serverco/32/4251_2.png) [@serverco](https://community.letsencrypt.org/u/serverco)\
**Post date:** [February 3, 2017, 8:26am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/3 "2017-02-03T08:26:38Z")

</div>

Does /root/.local/share/letsencrypt/bin/letsencrypt exist ?

if so, can you run

> /root/.local/share/letsencrypt/bin/letsencrypt --version

please and paste the result.

---

<div class="post-metadata">

**Author:** ![toadalskii](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@toadalskii](https://community.letsencrypt.org/u/toadalskii)\
**Post date:** [February 3, 2017, 9:15am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/4 "2017-02-03T09:15:23Z")

</div>

I have runned the command you have stated the console output is below:

Traceback (most recent call last):  
File “/root/.local/share/letsencrypt/bin/letsencrypt”, line 7, in   
from certbot.main import main  
File “/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/certbot/main.py”, line 11, in   
import zope.component  
File “/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/zope/component/ **init**.py”, line 16, in   
from zope.interface import Interface  
ImportError: No module named interface

---

<div class="post-metadata">

**Author:** ![serverco](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/serverco/32/4251_2.png) [@serverco](https://community.letsencrypt.org/u/serverco)\
**Post date:** [February 3, 2017, 9:20am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/5 "2017-02-03T09:20:38Z")

</div>

Many thanks, I understand where the issue / bug is now.

do you need to “quick fix” now to obtain new certificates or is it OK to wait a few days for a proper bug fix ?

---

<div class="post-metadata">

**Author:** ![toadalskii](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@toadalskii](https://community.letsencrypt.org/u/toadalskii)\
**Post date:** [February 3, 2017, 9:52am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/6 "2017-02-03T09:52:46Z")

</div>

I would be very glad if you can give a quick fix as i need to obtain new certificates.

can you please answer one small question also is this bug occurred due to update of certbot?

Thanks for your support and guidance.

**EDIT:**

@schoen @serverco Sorry i am editing this post to send you a reply but there is a policy that do not allow me to post more than 3 reply as i am a new user…

Back to your suggestion i have tried renaming and running certbot it is giving the same error. I am know also thinking this is a update issue and can affect all the user.

Thanks for Support.

---

<div class="post-metadata">

**Author:** ![serverco](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/serverco/32/4251_2.png) [@serverco](https://community.letsencrypt.org/u/serverco)\
**Post date:** [February 3, 2017, 10:08am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/7 "2017-02-03T10:08:20Z")

</div>

I’m not a certbot developer - someone like @schoen can hopefully give a better response, but in my understanding it’s related to the update of certbot, yes.

Looking at the [certbot code](https://github.com/certbot/certbot/blob/0070489843cb354e46b5cced315756a1622bb21e/certbot-auto#L638-L642) related to this error, then it’s checking the version of the the code at “$VENV\_BIN/letsencrypt” - in your case /root/.local/share/letsencrypt/bin/letsencrypt. Since that check fails (you can see that failure in the command I asked you to run ), then the whole thing fails with the “couldn’t get currently installed version …” error.

I haven’t tested it, but I’d be tempted to try just renaming “/root/.local/share/letsencrypt/bin/letsencrypt” to something else such as “/root/.local/share/letsencrypt/bin/letsencrypt\_old” and then re-running certbot (you can always rename it back if that doesn’t help).

---

<div class="post-metadata">

**Author:** ![serverco](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/serverco/32/4251_2.png) [@serverco](https://community.letsencrypt.org/u/serverco)\
**Post date:** [February 3, 2017, 10:30am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/8 "2017-02-03T10:30:15Z")

</div>

@toadalskii I’ve updated your account so you should be able to post.

Interesting - so you got exactly the same error “couldn’t get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt” even though “/root/.local/share/letsencrypt/bin/letsencrypt” doesn’t exist ? or did it recreate that file ?

---

<div class="post-metadata">

**Author:** ![toadalskii](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@toadalskii](https://community.letsencrypt.org/u/toadalskii)\
**Post date:** [February 3, 2017, 10:47am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/9 "2017-02-03T10:47:25Z")

</div>

Yes i get the same error :

Error: couldn’t get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt:  
Traceback (most recent call last):  
File “/root/.local/share/letsencrypt/bin/letsencrypt”, line 7, in   
from certbot.main import main  
File “/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/certbot/main.py”, line 11, in   
import zope.component  
File “/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/zope/component/ **init**.py”, line 16, in   
from zope.interface import Interface  
ImportError: No module named interface

**and the file: /root/.local/share/letsencrypt/bin/letsencrypt recreated**

---

<div class="post-metadata">

**Author:** ![dany-sh](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dany-sh](https://community.letsencrypt.org/u/dany-sh)\
**Post date:** [February 3, 2017, 10:50am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/10 "2017-02-03T10:50:13Z")

</div>

Hi, i got the same error with the same commande

> /root/.local/share/letsencrypt/bin/letsencrypt --version  
> Traceback (most recent call last):  
> File "/root/.local/share/letsencrypt/bin/letsencrypt", line 7, in   
> from certbot.main import main  
> File "/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/certbot/main.py", line 11, in   
> import zope.component  
> File "/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/zope/component/ **init**.py", line 16, in   
> from zope.interface import Interface  
> ImportError: No module named interface

---

<div class="post-metadata">

**Author:** ![sovaj](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@sovaj](https://community.letsencrypt.org/u/sovaj)\
**Post date:** [February 3, 2017, 11:20am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/11 "2017-02-03T11:20:18Z")

</div>

Hello all,

Just to let you know that I got the same issue and was wondering if there is any option to just rollback to the previous version locally and block the update until you fix the bug ?

Thanks

---

<div class="post-metadata">

**Author:** ![LetsEncryptIsAwesome](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@LetsEncryptIsAwesome](https://community.letsencrypt.org/u/LetsEncryptIsAwesome)\
**Post date:** [February 3, 2017, 12:04pm UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/12 "2017-02-03T12:04:48Z")

</div>

Hi,

Registered a new account to chime in on this. I’ve got exactly the same problem - Linux Amazon AMI hosted in AWS and I’m getting the same error trying to create a new cert.

I’ve annoyingly got a new client waiting on the cert to go live and I can’t wait a few days for the official fix, is there a dirty work around I can use in the mean time?

Thanks.

---

<div class="post-metadata">

**Author:** ![dany-sh](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dany-sh](https://community.letsencrypt.org/u/dany-sh)\
**Post date:** [February 3, 2017, 1:34pm UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/13 "2017-02-03T13:34:14Z")

</div>

I found a way to get this work 🙂

```
 pip install pip --upgrade
 pip install virtualenv --upgrade
virtualenv -p /usr/bin/python27 venv27
. venv27/bin/activate
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
unset PYTHON_INSTALL_LAYOUT

```

Then update letsencrypt:  
`./letsencrypt-auto -v`

And run the command to renew your certificate.

---

<div class="post-metadata">

**Author:** ![whiskeyseven](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@whiskeyseven](https://community.letsencrypt.org/u/whiskeyseven)\
**Post date:** [February 3, 2017, 3:44pm UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/14 "2017-02-03T15:44:25Z")

</div>

Created a new account here to chime in with the exact same issue as the others, encountered when running renewals.

Amazon Linux, Apache

Getting a little worried/desperate for a fix, certs are going to expire… is there a rollback option? re-install certbot from scratch?

---

<div class="post-metadata">

**Author:** ![whiskeyseven](https://avatars.discourse-cdn.com/v4/letter/w/ea5d25/32.png) [@whiskeyseven](https://community.letsencrypt.org/u/whiskeyseven)\
**Post date:** [February 6, 2017, 3:28pm UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/15 "2017-02-06T15:28:18Z")

</div>

Wanted to update here in case it helps others, I was able to find a solution.

I simply deleted the actual source dir, but LEFT everything else intact (i.e. /etc/letsencrypt, logs, etc) - this let me re-run certbot-auto installation WITHOUT losing my existing keys, certs, and renewal configuration

do this:

rm -rf ~/.local/share/letsencrypt  
./certbot-auto

Once the packages were reinstalled, I could run ‘certbot-auto renew’ again, against my existing configuration. All my existing certs were renewed as normal.

Hopefully this helps someone!

---

<div class="post-metadata">

**Author:** ![toadalskii](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@toadalskii](https://community.letsencrypt.org/u/toadalskii)\
**Post date:** [February 7, 2017, 6:42am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/16 "2017-02-07T06:42:22Z")

</div>

Hi @serverco ,

Any News?

---

<div class="post-metadata">

**Author:** ![serverco](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/serverco/32/4251_2.png) [@serverco](https://community.letsencrypt.org/u/serverco)\
**Post date:** [February 7, 2017, 8:11am UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/17 "2017-02-07T08:11:31Z")

</div>

I haven’t heard the latest - hopefully @schoen or @bmw can update in the US morning.

---

<div class="post-metadata">

**Author:** ![Mrvn](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@Mrvn](https://community.letsencrypt.org/u/Mrvn)\
**Post date:** [February 7, 2017, 7:25pm UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/18 "2017-02-07T19:25:45Z")

</div>

Hi,  
run the commands in the following sequence:

rm -rf ~/.local/share/letsencrypt  
./certbot-auto --debug  
choose c when asked  
./letsencrypt-auto --debug certonly -a webroot --agree-tos --renew-by-default YOUR Domain Details.

---

<div class="post-metadata">

**Author:** ![rsshilli](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@rsshilli](https://community.letsencrypt.org/u/rsshilli)\
**Post date:** [February 7, 2017, 10:25pm UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/19 "2017-02-07T22:25:30Z")

</div>

@Mrvn when I do that, the rm works fine, but when I run certbot-auto --debug I get this:

```
[root@ip-10-235-0-253 certbot]# ./certbot-auto --debug
Bootstrapping dependencies via Amazon Linux...
yum is /usr/bin/yum
Loaded plugins: priorities, update-motd, upgrade-helper
Package gcc-4.8.3-3.20.amzn1.noarch already installed and latest version
Package augeas-libs-1.0.0-5.7.amzn1.x86_64 already installed and latest version
Package 1:openssl-1.0.1k-15.96.amzn1.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.1k-15.96.amzn1.x86_64 already installed and latest version
Package libffi-devel-3.0.13-16.5.amzn1.x86_64 already installed and latest version
Package system-rpm-config-9.0.3-42.28.amzn1.noarch already installed and latest version
Package ca-certificates-2015.2.6-65.0.1.16.amzn1.noarch already installed and latest version
Package python27-2.7.12-2.120.amzn1.x86_64 already installed and latest version
Package python27-devel-2.7.12-2.120.amzn1.x86_64 already installed and latest version
Package python27-virtualenv-12.0.7-1.13.amzn1.noarch already installed and latest version
Package python27-tools-2.7.12-2.120.amzn1.x86_64 already installed and latest version
Package python27-pip-6.1.1-1.23.amzn1.noarch already installed and latest version
Package 1:mod_ssl-2.2.31-1.8.amzn1.x86_64 already installed and latest version
Nothing to do
Creating virtual environment...
Installing Python packages...
Installation succeeded.
Traceback (most recent call last):
File "/root/.local/share/letsencrypt/bin/letsencrypt", line 7, in <module>
    from certbot.main import main
File "/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/certbot/main.py", line 11, in <module>
    import zope.component
File "/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/zope/component/ __init__.py", line 16, in <module>
    from zope.interface import Interface
ImportError: No module named interface
[root@ip-10-235-0-253 certbot]#

```

Note the Traceback at the end. I was never asked any option in order to choose “c”.

---

<div class="post-metadata">

**Author:** ![rsshilli](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@rsshilli](https://community.letsencrypt.org/u/rsshilli)\
**Post date:** [February 7, 2017, 10:31pm UTC](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031/20 "2017-02-07T22:31:24Z")

</div>

OK. I got this working. I went back to @dany-sh’s comment and then everything worked after I ran his commands to update pip, etc.

Ryan

[Next page](https://community.letsencrypt.org/t/getting-error-couldnt-get-currently-installed-version-for-letsencrypt-when-trying-to-renew-my-certificates/27031.md?page=2)
