0

When i am installing ssl of letsencrypt getting issue ; i am using apache for flask application on digitalocean and ubuntu 16.4. I have installed virtualenv using python3. I have also tryied some code

Line 1347 and 1357 : pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version']) by pip_version = StrictVersion(check_output(['pip', '--version']) and command = [python, '-m', 'pip', 'install', '--no-index', '--no-deps', '-U'] by command = ['pip', 'install', '--no-index', '--no-deps', '-U']

But not any possitive result. I am getting issue like: '''

root@ubuntu-s-1vcpu-2gb-sgp1-01:/letsencrypt/letsencrypt# ./letsencrypt-auto --help
    Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
    Get:1 http://mirrors.digitalocean.com/ubuntu bionic InRelease [242 kB]
    Hit:2 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease
    Hit:3 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease
    Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
    Fetched 242 kB in 1s (455 kB/s)
    Reading package lists... Done
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    augeas-lenses is already the newest version (1.10.1-2).
    libaugeas0 is already the newest version (1.10.1-2).
    libffi-dev is already the newest version (3.2.1-8).
    python is already the newest version (2.7.15~rc1-1).
    python-dev is already the newest version (2.7.15~rc1-1).
    python-virtualenv is already the newest version (15.1.0+ds-1.1).
    virtualenv is already the newest version (15.1.0+ds-1.1).
    ca-certificates is already the newest version (20190110~18.04.1).
    gcc is already the newest version (4:7.4.0-1ubuntu2.3).
    libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.6).
    openssl is already the newest version (1.1.1-1ubuntu2.1~18.04.6).
    0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.
    Creating virtual environment...
    usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--clear-app-data] 
   [--discovery {builtin}] [-p py] [--creator {builtin,cpython2-posix}] [--seeder {app-data,pip}] [--no- 
   seed] [--activators comma_sep_list]
                  [--clear] [--system-site-packages] [--symlinks | --copies] [--no-download | --download] 
    [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip] [- 
   -no-setuptools] [--no-wheel]
                  [--symlink-app-data] [--prompt prompt] [-h]
                  dest
   virtualenv: error: unrecognized arguments: --no-site-packages
   Traceback (most recent call last):
   File "<stdin>", line 27, in <module>
   File "<stdin>", line 19, in create_venv
   File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
   subprocess.CalledProcessError: Command '['virtualenv', '--no-site-packages', '--python', 
   '/usr/bin/python2.7', '/opt/eff.org/certbot/venv']' returned non-zero exit status 2

'''

JanmejayDev
  • 9
  • 1
  • 3

1 Answers1

0

I've found two ways to fix this error:

  1. Run these commands to upgrade pip and then reinstall virtualenv:
pip install --upgrade pip
pip uninstall virtualenv
pip install virtualenv
  1. Check the location of virtualenv - it may be in /usr/bin/virtualenv. If it doesn't exist but there's a virtualenv there with a number after it like virtualenv-2 or virtualenv-2.7, then make a symbolic link from virtualenv to one of those existing files.
Russell G
  • 470
  • 6
  • 16