Let's Encrypt certificate installation issue: Failed to install the extension

Created:

2016-12-12 03:39:32 UTC

Modified:

2017-08-08 13:14:36 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Let's Encrypt certificate installation issue: Failed to install the extension

Applicable to:

  • Plesk for Windows

Symptoms

  1. The following error appears when installing Let's Encrypt:

    Error: Failed to install the extension:

    Execution of D:\Program Files (x86)\Parallels\Plesk\admin\plib\modules\letsencrypt\scripts\post-install.php failed with exit code 1 and the output:
    Traceback (most recent call last):
    File "D:\Program Files (x86)\Parallels\Plesk\python\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
    File "D:\Program Files (x86)\Parallels\Plesk\python\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
    File "D:\Program Files (x86)\Parallels\Plesk\python\lib\site-packages\virtualenv.py", line 2386, in <module>
    main()
    File "D:\Program Files (x86)\Parallels\Plesk\python\lib\site-packages\virtualenv.py", line 859, in main
    symlink=options.symlink)
    File "D:\Program Files (x86)\Parallels\Plesk\python\lib\site-packages\virtualenv.py", line 1037, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
    File "D:\Program Files (x86)\Parallels\Plesk\python\lib\site-packages\virtualenv.py", line 1002, in install_wheel
    'PIP_NO_INDEX': '1'
    File "D:\Program Files (x86)\Parallels\Plesk\python\lib\site-packages\virtualenv.py", line 937, in call_subprocess
    % (cmd_desc, proc.returncode))
    OSError: Command "D:\Program Files (x8...p\Scripts\python.exe" -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code 1
  2. The following error appears when trying to renew a Let's Encrypt certificate:

    Error: Let's Encrypt SSL certificate installation failed: Failed letsencrypt execution: Traceback (most recent call last):
    File &quot;D:\Program Files (x86)\Parallels\Plesk\python\Lib\runpy.py&quot;, line 162, in _run_module_as_main
    &quot;__main__&quot;, fname, loader, pkg_name)
    File &quot;D:\Program Files (x86)\Parallels\Plesk\python\Lib\runpy.py&quot;, line 72, in _run_code
    exec code in run_globals
    File &quot;D:\Program Files (x86)\Parallels\Plesk\var\modules\letsencrypt\venv\Scripts\certbot.exe\__main__.py&quot;, line 5, in &lt;module&gt;
    File &quot;d:\program files (x86)\parallels\plesk\var\modules\letsencrypt\venv\lib\site-packages\certbot\main.py&quot;, line 14, in &lt;module&gt; from acme import jose
    File &quot;d:\program files (x86)\parallels\plesk\var\modules\letsencrypt\venv\lib\site-packages\acme\jose\__init__.py&quot;, line 37, in &lt;module&gt; from acme.jose.interfaces import JSONDeSerializable
    File &quot;d:\program files (x86)\parallels\plesk\var\modules\letsencrypt\venv\lib\site-packages\acme\jose\interfaces.py&quot;, line 9, in &lt;module&gt; from acme.jose import util
    File &quot;d:\program files (x86)\parallels\plesk\var\modules\letsencrypt\venv\lib\site-packages\acme\jose\util.py&quot;, line 4, in &lt;module&gt; from cryptography.hazmat.primitives.asymmetric import rsa
    ImportError: No module named primitives.asymmetric

    Or:
    Let's Encrypt SSL certificate installation failed: Installation is broken.

Cause

Let's Encrypt installation failed to build an isolated environment.

Resolution

After Let's Encrypt installation, build the environment manually:

cd %plesk_dir%
python\python.exe -m virtualenv "var\modules\letsencrypt\venv" --no-wheel --no-setuptool
xcopy python\Lib\site-packages\pip var\modules\letsencrypt\venv\Lib\site-packages\pip /I /S
var\modules\letsencrypt\venv\Scripts\python.exe -m pip install -U pip
var\modules\letsencrypt\venv\Scripts\python.exe -m pip install -U setuptools
var\modules\letsencrypt\venv\Scripts\python.exe -m pip install -U letsencrypt-plesk
Have more questions? Submit a request
Please sign in to leave a comment.