Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can´t create Virtual env. creation on Debian Wheezy #1554

Closed
TheHades opened this issue Nov 18, 2015 · 24 comments
Closed

Can´t create Virtual env. creation on Debian Wheezy #1554

TheHades opened this issue Nov 18, 2015 · 24 comments

Comments

@TheHades
Copy link

Hi guys,
i´m running letsencrypt on a Debian Wheezy Server.
No Backports-Repo or something else.

I also removed the directory and done a fresh copy.

Log:

root@server1 ~/letsencrypt # ./letsencrypt-auto --server       https://acme-v01.api.letsencrypt.org/directory --help --verbose
Bootstrapping dependencies for Debian-based OSes...
Hit http://mirror.hetzner.de wheezy Release.gpg
Hit http://mirror.hetzner.de wheezy/updates Release.gpg
Hit http://mirror.hetzner.de wheezy Release
Hit http://mirror.hetzner.de wheezy/updates Release
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release
Hit http://mirror.hetzner.de wheezy/main amd64 Packages
Hit http://mirror.hetzner.de wheezy/contrib amd64 Packages
Hit http://mirror.hetzner.de wheezy/non-free amd64 Packages
Hit http://mirror.hetzner.de wheezy/updates/main amd64 Packages
Hit http://mirror.hetzner.de wheezy/updates/contrib amd64 Packages
Hit http://mirror.hetzner.de wheezy/updates/non-free amd64 Packages
Hit http://http.debian.net wheezy Release.gpg
Hit http://security.debian.org wheezy/updates/main Sources
Hit http://packages.dotdeb.org wheezy-php56 Release.gpg
Hit http://security.debian.org wheezy/updates/contrib Sources
Hit http://security.debian.org wheezy/updates/non-free Sources
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://packages.dotdeb.org wheezy-php56 Release
Hit http://security.debian.org wheezy/updates/contrib amd64 Packages
Hit http://http.debian.net wheezy Release
Hit http://security.debian.org wheezy/updates/non-free amd64 Packages
Hit http://packages.prosody.im wheezy Release.gpg
Hit http://http.debian.net wheezy/main Sources
Hit http://packages.dotdeb.org wheezy-php56/all Sources
Hit http://packages.prosody.im wheezy Release
Hit http://http.debian.net wheezy/non-free Sources
Hit http://http.debian.net wheezy/contrib Sources
Hit http://http.debian.net wheezy/main amd64 Packages
Hit http://packages.dotdeb.org wheezy-php56/all amd64 Packages
Hit http://http.debian.net wheezy/non-free amd64 Packages
Hit http://packages.prosody.im wheezy/main amd64 Packages
Hit http://http.debian.net wheezy/contrib amd64 Packages
Hit http://nginx.org wheezy Release.gpg
Hit http://nginx.org wheezy Release
Hit http://nginx.org wheezy/nginx Sources
Hit http://nginx.org wheezy/nginx amd64 Packages
Reading package lists... Done
E: No packages found
Reading package lists... Done
Building dependency tree
Reading state information... Done
libaugeas0 is already the newest version.
ca-certificates is already the newest version.
dialog is already the newest version.
gcc is already the newest version.
git is already the newest version.
libffi-dev is already the newest version.
libssl-dev is already the newest version.
python-virtualenv is already the newest version.
python is already the newest version.
python-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Creating virtual environment...
Running virtualenv with interpreter /usr/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in /root/.local/share/letsencrypt/bin/python2.7
Also creating executable in /root/.local/share/letsencrypt/bin/python
Installing distribute.................................done.
Installing pip...
  Error [Errno 2] No such file or directory while executing command /root/.local/share/l...ypt/bin/easy_install /usr/share/python-vi...p-1.1.debian1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 2283, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
    never_download=options.never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1054, in create_environment
    install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 643, in install_pip
    filter_stdout=_filter_setup)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 976, in call_subprocess
    cwd=cwd, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
root@server1 ~ # dpkg -l *virtualenv*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                         Architecture                    Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii  python-virtualenv                                     1.7.1.2-2                       all                             Python virtual environment creator
root@server1 ~ # pip --version
pip 1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

Any solution? :)

Thanks in advance,

@pde
Copy link
Member

pde commented Nov 18, 2015

It's frustrating that that traceback doesn't actually say what the missing file is. Looks like we'd have to edit /usr/lib/python2.7/dist-packages/virtualenv.py to add some verbosity to find out.

If you do rm -rf ~/.local/share/letsencrypt/, is the problem consistently reproducible? If so I'll spin up a wheezy VM to try and reproduce.

@thuandt
Copy link

thuandt commented Nov 19, 2015

I faced same problem in my Debian Wheezy host

@pde
Copy link
Member

pde commented Nov 19, 2015

Someone else reported that installing / updating python2.7-dev was fixing #1564 for them. Is that possibly the issue here, too?

@TheHades
Copy link
Author

@pde
Yes, then problem is reproducible.
Also rm -rf ~/.local/share/letsencrypt/ did not fix the problem.

Do you really mean:
I can´t find any package with this name.
pythond2.7-dev ?

Or do you mean:
python2.7-dev

python2.7-dev is already installed.

@c00
Copy link

c00 commented Feb 16, 2016

I was having the same problem on Debian Wheezy, however I was trying with a user account (not with root) who has sudo capabilities. On my Jessie box that was enough as letsencrypt tries to sudo itself. So the command was just: letsencrypt-auto --apache -d example.com

However here it wasn't enough. But running sudo letsencrypt-auto --apache -d example.com did work and it solved everything.

@gbeddow
Copy link

gbeddow commented Apr 12, 2016

I'm having a similar problem (https://github.com/letsencrypt/letsencrypt/issues/2817]).

Did anyone find a solution for this one?

@bmw
Copy link
Member

bmw commented Apr 12, 2016

What happens if you run virtualenv --no-site-package --python python2.7 $(mktemp -d)?

EDIT:

Also make sure you're using an up to date copy of letsencrypt-auto. We started being able to easily release patches to the script back in February. Copies downloaded before them do not automatically get updates.

@gbeddow
Copy link

gbeddow commented Apr 12, 2016

I'm using letsencrypt-auto downloaded from git yesterday.

Here's what happens with virtualenv:

# virtualenv --no-site-package --python python2.7 $(mktemp -d)
Running virtualenv with interpreter /usr/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in /tmp/tmp.SweZ1plO5h/bin/python2.7
Also creating executable in /tmp/tmp.SweZ1plO5h/bin/python
Installing distribute.................................done.
Installing pip...
  Error [Errno 2] No such file or directory while executing command /tmp/tmp.SweZ1plO5h/bin/easy_install /usr/share/python-vi...p-1.1.debian1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 2283, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
    never_download=options.never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1054, in create_environment
    install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 643, in install_pip
    filter_stdout=_filter_setup)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 976, in call_subprocess
    cwd=cwd, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

@bmw
Copy link
Member

bmw commented Apr 12, 2016

This is a problem with virtualenv and I'm unable to reproduce with the wheezy dockerfile, however, I have a couple more things you can try to help identify the problem.

  1. What is the output of the following command? There will be quite a bit of output.
export TMP=$(mktemp -d)
virtualenv --no-site-package --python python2.7 -vvv $TMP
  1. Continuing with the environment variable TMP, what are the contents of the directories $TMP/bin and /usr/share/python-virtualenv?

My current hypothesis is virtualenv is failing to install distribute but the problems aren't showing up until later.

@gbeddow
Copy link

gbeddow commented Apr 12, 2016

Here's what happens with virtualenv:

# export TMP=$(mktemp -d)
# virtualenv --no-site-package --python python2.7 -vvv $TMP
Running virtualenv with interpreter /usr/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
Creating /tmp/tmp.o2GFLIP35J/lib/python2.7
Symlinking Python bootstrap modules
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/lib-dynload
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/os.py
  Ignoring built-in bootstrap module: posix
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/posixpath.py
  Cannot import bootstrap module: nt
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/ntpath.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/genericpath.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/fnmatch.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/locale.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/encodings
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/codecs.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/stat.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/UserDict.py
  File /tmp/tmp.o2GFLIP35J/lib/python2.7/lib-dynload/readline.arm-linux-gnueabi.so already exists
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/copy_reg.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/types.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/re.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/sre.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/sre_parse.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/sre_constants.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/sre_compile.py
  Ignoring built-in bootstrap module: zlib
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/warnings.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/linecache.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/_abcoll.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/abc.py
  Symlinking /tmp/tmp.o2GFLIP35J/lib/python2.7/_weakrefset.py
Creating /tmp/tmp.o2GFLIP35J/lib/python2.7/site-packages
Writing /tmp/tmp.o2GFLIP35J/lib/python2.7/site.py
Writing /tmp/tmp.o2GFLIP35J/lib/python2.7/orig-prefix.txt
Writing /tmp/tmp.o2GFLIP35J/lib/python2.7/no-global-site-packages.txt
Creating parent directories for /tmp/tmp.o2GFLIP35J/include
Symlinking /tmp/tmp.o2GFLIP35J/include/python2.7
Creating /tmp/tmp.o2GFLIP35J/bin
New python executable in /tmp/tmp.o2GFLIP35J/bin/python2.7
Changed mode of /tmp/tmp.o2GFLIP35J/bin/python2.7 to 0755
Also creating executable in /tmp/tmp.o2GFLIP35J/bin/python
Changed mode of /tmp/tmp.o2GFLIP35J/bin/python to 0755
Testing executable with /tmp/tmp.o2GFLIP35J/bin/python2.7 -c "
import sys
prefix = sys.prefix
if sys.version_info[0] == 3:
    prefix = prefix.encode('utf8')
if hasattr(sys.stdout, 'detach'):
    sys.stdout = sys.stdout.detach()
elif hasattr(sys.stdout, 'buffer'):
    sys.stdout = sys.stdout.buffer
sys.stdout.write(prefix)
"
Got sys.prefix result: u'/tmp/tmp.o2GFLIP35J'
Creating /tmp/tmp.o2GFLIP35J/lib/python2.7/distutils
Writing /tmp/tmp.o2GFLIP35J/lib/python2.7/distutils/__init__.py
Writing /tmp/tmp.o2GFLIP35J/lib/python2.7/distutils/distutils.cfg
Using existing distribute egg: /usr/share/python-virtualenv/distribute-0.6.24.tar.gz
Installing distribute...
  Running command /tmp/tmp.o2GFLIP35J/bin/python2.7 -c "#!python
\"\"\"Bootstra... main(sys.argv[1:])
" -v --always-copy -U distribute
  Extracting in /tmp/tmp.o2GFLIP35J/tmprY4X8e
  Now working in /tmp/tmp.o2GFLIP35J/tmprY4X8e/distribute-0.6.24
  Installing Distribute
  running install
  Traceback (most recent call last):
    File "setup.py", line 212, in <module>
      scripts = scripts,
    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python2.7/distutils/dist.py", line 971, in run_command
      cmd_obj.ensure_finalized()
    File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
      self.finalize_options()
    File "/tmp/tmp.o2GFLIP35J/tmprY4X8e/distribute-0.6.24/setuptools/command/install.py", line 29, in finalize_options
      _install.finalize_options(self)
    File "/usr/lib/python2.7/distutils/command/install.py", line 321, in finalize_options
      (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
    File "/tmp/tmp.o2GFLIP35J/lib/python2.7/distutils/__init__.py", line 88, in sysconfig_get_config_vars
      real_vars = old_get_config_vars(*args)
    File "/usr/lib/python2.7/distutils/sysconfig.py", line 508, in get_config_vars
      func()
    File "/usr/lib/python2.7/distutils/sysconfig.py", line 452, in _init_posix
      from _sysconfigdata import build_time_vars
    File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in <module>
      from _sysconfigdata_nd import *
  ImportError: No module named _sysconfigdata_nd
  Something went wrong during the installation.
  See the error message above.
...Installing distribute...done.
Installing existing pip-1.1.debian1.tar.gz distribution: /usr/share/python-virtualenv/pip-1.1.debian1.tar.gz
Installing pip...
  Running command /tmp/tmp.o2GFLIP35J/bin/easy_install /usr/share/python-vi...p-1.1.debian1.tar.gz
  Error [Errno 2] No such file or directory while executing command /tmp/tmp.o2GFLIP35J/bin/easy_install /usr/share/python-vi...p-1.1.debian1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 2283, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
    never_download=options.never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1054, in create_environment
    install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 643, in install_pip
    filter_stdout=_filter_setup)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 976, in call_subprocess
    cwd=cwd, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Contents of the directories $TMP/bin and /usr/share/python-virtualenv:

# ls -al $TMP/bin
total 6380
drwxr-xr-x 2 root root    4096 Apr 12 13:46 .
drwx------ 6 root root    4096 Apr 12 13:46 ..
-rwxr-xr-x 1 root root 3258924 Apr 12 13:46 python
-rwxr-xr-x 1 root root 3258924 Apr 12 13:46 python2.7

# ls -al /usr/share/python-virtualenv
total 2028
drwxr-xr-x   2 root root   4096 Apr 11 07:54 .
drwxr-xr-x 106 root root   4096 Apr 11 07:54 ..
-rw-r--r--   1 root root 620771 Nov 30  2011 distribute-0.6.24.tar.gz
-rw-r--r--   1 root root  96637 Jul 12  2012 pip-1.1.debian1.tar.gz
-rw-r--r--   1 root root 337658 Mar 16  2011 setuptools-0.6c11-py2.4.egg
-rw-r--r--   1 root root 333390 Mar 16  2011 setuptools-0.6c11-py2.5.egg
-rw-r--r--   1 root root 333447 Apr  4  2011 setuptools-0.6c11-py2.6.egg
-rw-r--r--   1 root root 332005 Mar 19  2011 setuptools-0.6c11-py2.7.egg

@bmw
Copy link
Member

bmw commented Apr 12, 2016

@gbeddow, the relevant output there is:

  ImportError: No module named _sysconfigdata_nd
  Something went wrong during the installation.
  See the error message above.
...Installing distribute...done.

Because of this, easy_install doesn't exist in $TMP/bin causing the error you're seeing. This issue has been reported for Ubuntu at pypa/virtualenv#410. There's a few workaround suggested there, most involving creating a symlink like this:

ln -fs /usr/lib/python2.7/plat-*/_sysconfigdata.py /usr/lib/python2.7/

where the name of the plat-* directory is platform dependent.

@gbeddow
Copy link

gbeddow commented Apr 12, 2016

Still not working:

# ls -al /usr/lib/python2.7
...
drwxr-xr-x  2 root root   4096 Jan 19 16:27 plat-arm-linux-gnueabi
...

# ls -al /usr/lib/python2.7/plat-arm-linux-gnueabi
total 148
drwxr-xr-x  2 root root  4096 Jan 19 16:27 .
drwxr-xr-x 27 root root 20480 Apr 12 14:57 ..
-rw-r--r--  1 root root  5035 Dec 10  2014 CDROM.py
-rw-r--r--  1 root root  6746 Jan 19 16:27 CDROM.pyc
-rw-r--r--  1 root root  1628 Dec 10  2014 DLFCN.py
-rw-r--r--  1 root root  2807 Jan 19 16:27 DLFCN.pyc
-rw-r--r--  1 root root 15532 Mar  1  2015 IN.py
-rw-r--r--  1 root root 29041 Jan 19 16:27 IN.pyc
-rw-r--r--  1 root root 17076 Mar  1  2015 _sysconfigdata_nd.py
-rw-r--r--  1 root root 19930 Jan 19 16:14 _sysconfigdata_nd.pyc
-rw-r--r--  1 root root  3420 Dec 10  2014 TYPES.py
-rw-r--r--  1 root root  6300 Jan 19 16:27 TYPES.pyc

# ln -fs /usr/lib/python2.7/plat-arm-linux-gnueabi/_sysconfigdata.py /usr/lib/python2.7/

# ls -al /usr/lib/python2.7/_sysconfigdata.py
lrwxrwxrwx 1 root root 59 Apr 12 14:57 /usr/lib/python2.7/_sysconfigdata.py -> /usr/lib/python2.7/plat-arm-linux-gnueabi/_sysconfigdata.py

# virtualenv --no-site-package --python python2.7 -vvv $TMP
Running virtualenv with interpreter /usr/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
Creating /tmp/tmp.huVY2YAmlt/lib/python2.7
Symlinking Python bootstrap modules
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/lib-dynload
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/os.py
  Ignoring built-in bootstrap module: posix
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/posixpath.py
  Cannot import bootstrap module: nt
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/ntpath.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/genericpath.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/fnmatch.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/locale.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/encodings
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/codecs.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/stat.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/UserDict.py
  File /tmp/tmp.huVY2YAmlt/lib/python2.7/lib-dynload/readline.arm-linux-gnueabi.so already exists
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/copy_reg.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/types.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/re.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/sre.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/sre_parse.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/sre_constants.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/sre_compile.py
  Ignoring built-in bootstrap module: zlib
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/warnings.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/linecache.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/_abcoll.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/abc.py
  Symlinking /tmp/tmp.huVY2YAmlt/lib/python2.7/_weakrefset.py
Creating /tmp/tmp.huVY2YAmlt/lib/python2.7/site-packages
Writing /tmp/tmp.huVY2YAmlt/lib/python2.7/site.py
Writing /tmp/tmp.huVY2YAmlt/lib/python2.7/orig-prefix.txt
Writing /tmp/tmp.huVY2YAmlt/lib/python2.7/no-global-site-packages.txt
Creating parent directories for /tmp/tmp.huVY2YAmlt/include
Symlinking /tmp/tmp.huVY2YAmlt/include/python2.7
Creating /tmp/tmp.huVY2YAmlt/bin
New python executable in /tmp/tmp.huVY2YAmlt/bin/python2.7
Changed mode of /tmp/tmp.huVY2YAmlt/bin/python2.7 to 0755
Also creating executable in /tmp/tmp.huVY2YAmlt/bin/python
Changed mode of /tmp/tmp.huVY2YAmlt/bin/python to 0755
Testing executable with /tmp/tmp.huVY2YAmlt/bin/python2.7 -c "
import sys
prefix = sys.prefix
if sys.version_info[0] == 3:
    prefix = prefix.encode('utf8')
if hasattr(sys.stdout, 'detach'):
    sys.stdout = sys.stdout.detach()
elif hasattr(sys.stdout, 'buffer'):
    sys.stdout = sys.stdout.buffer
sys.stdout.write(prefix)
"
Got sys.prefix result: u'/tmp/tmp.huVY2YAmlt'
Creating /tmp/tmp.huVY2YAmlt/lib/python2.7/distutils
Writing /tmp/tmp.huVY2YAmlt/lib/python2.7/distutils/__init__.py
Writing /tmp/tmp.huVY2YAmlt/lib/python2.7/distutils/distutils.cfg
Using existing distribute egg: /usr/share/python-virtualenv/distribute-0.6.24.tar.gz
Installing distribute...
  Running command /tmp/tmp.huVY2YAmlt/bin/python2.7 -c "#!python
\"\"\"Bootstra... main(sys.argv[1:])
" -v --always-copy -U distribute
  Extracting in /tmp/tmp.huVY2YAmlt/tmpVJhdZ3
  Now working in /tmp/tmp.huVY2YAmlt/tmpVJhdZ3/distribute-0.6.24
  Installing Distribute
  running install
  Traceback (most recent call last):
    File "setup.py", line 212, in <module>
      scripts = scripts,
    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python2.7/distutils/dist.py", line 971, in run_command
      cmd_obj.ensure_finalized()
    File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
      self.finalize_options()
    File "/tmp/tmp.huVY2YAmlt/tmpVJhdZ3/distribute-0.6.24/setuptools/command/install.py", line 29, in finalize_options
      _install.finalize_options(self)
    File "/usr/lib/python2.7/distutils/command/install.py", line 321, in finalize_options
      (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
    File "/tmp/tmp.huVY2YAmlt/lib/python2.7/distutils/__init__.py", line 88, in sysconfig_get_config_vars
      real_vars = old_get_config_vars(*args)
    File "/usr/lib/python2.7/distutils/sysconfig.py", line 508, in get_config_vars
      func()
    File "/usr/lib/python2.7/distutils/sysconfig.py", line 452, in _init_posix
      from _sysconfigdata import build_time_vars
    File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in <module>
  ImportError: No module named _sysconfigdata_nd
  Something went wrong during the installation.
  See the error message above.
...Installing distribute...done.
Installing existing pip-1.1.debian1.tar.gz distribution: /usr/share/python-virtualenv/pip-1.1.debian1.tar.gz
Installing pip...
  Running command /tmp/tmp.huVY2YAmlt/bin/easy_install /usr/share/python-vi...p-1.1.debian1.tar.gz
  Error [Errno 2] No such file or directory while executing command /tmp/tmp.huVY2YAmlt/bin/easy_install /usr/share/python-vi...p-1.1.debian1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 2283, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
    never_download=options.never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1054, in create_environment
    install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 643, in install_pip
    filter_stdout=_filter_setup)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 976, in call_subprocess
    cwd=cwd, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

@gbeddow
Copy link

gbeddow commented Apr 12, 2016

After creating one more symlink file the process gets further, but now letsencrypt-auto hangs.

First, here's what virtualenv does:

# ln -fs /usr/lib/python2.7/plat-arm-linux-gnueabi/_sysconfigdata_nd.py /usr/lib/python2.7/

# ls -al /usr/lib/python2.7/_sysconfigdata_nd.py
lrwxrwxrwx 1 root root 62 Apr 12 15:52 /usr/lib/python2.7/_sysconfigdata_nd.py -> /usr/lib/python2.7/plat-arm-linux-gnueabi/_sysconfigdata_nd.py

# export TMP=$(mktemp -d)
# virtualenv --no-site-package --python python2.7 -vvv $TMP
Running virtualenv with interpreter /usr/bin/python2.7
The --no-site-packages flag is deprecated; it is now the default behavior.
Creating /tmp/tmp.tbPWu1oZLn/lib/python2.7
Symlinking Python bootstrap modules
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/lib-dynload
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/os.py
  Ignoring built-in bootstrap module: posix
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/posixpath.py
  Cannot import bootstrap module: nt
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/ntpath.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/genericpath.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/fnmatch.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/locale.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/encodings
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/codecs.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/stat.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/UserDict.py
  File /tmp/tmp.tbPWu1oZLn/lib/python2.7/lib-dynload/readline.arm-linux-gnueabi.so already exists
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/copy_reg.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/types.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/re.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/sre.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/sre_parse.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/sre_constants.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/sre_compile.py
  Ignoring built-in bootstrap module: zlib
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/warnings.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/linecache.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/_abcoll.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/abc.py
  Symlinking /tmp/tmp.tbPWu1oZLn/lib/python2.7/_weakrefset.py
Creating /tmp/tmp.tbPWu1oZLn/lib/python2.7/site-packages
Writing /tmp/tmp.tbPWu1oZLn/lib/python2.7/site.py
Writing /tmp/tmp.tbPWu1oZLn/lib/python2.7/orig-prefix.txt
Writing /tmp/tmp.tbPWu1oZLn/lib/python2.7/no-global-site-packages.txt
Creating parent directories for /tmp/tmp.tbPWu1oZLn/include
Symlinking /tmp/tmp.tbPWu1oZLn/include/python2.7
Creating /tmp/tmp.tbPWu1oZLn/bin
New python executable in /tmp/tmp.tbPWu1oZLn/bin/python2.7
Changed mode of /tmp/tmp.tbPWu1oZLn/bin/python2.7 to 0755
Also creating executable in /tmp/tmp.tbPWu1oZLn/bin/python
Changed mode of /tmp/tmp.tbPWu1oZLn/bin/python to 0755
Testing executable with /tmp/tmp.tbPWu1oZLn/bin/python2.7 -c "
import sys
prefix = sys.prefix
if sys.version_info[0] == 3:
    prefix = prefix.encode('utf8')
if hasattr(sys.stdout, 'detach'):
    sys.stdout = sys.stdout.detach()
elif hasattr(sys.stdout, 'buffer'):
    sys.stdout = sys.stdout.buffer
sys.stdout.write(prefix)
"
Got sys.prefix result: u'/tmp/tmp.tbPWu1oZLn'
Creating /tmp/tmp.tbPWu1oZLn/lib/python2.7/distutils
Writing /tmp/tmp.tbPWu1oZLn/lib/python2.7/distutils/__init__.py
Writing /tmp/tmp.tbPWu1oZLn/lib/python2.7/distutils/distutils.cfg
Using existing distribute egg: /usr/share/python-virtualenv/distribute-0.6.24.tar.gz
Installing distribute...
  Running command /tmp/tmp.tbPWu1oZLn/bin/python2.7 -c "#!python
\"\"\"Bootstra... main(sys.argv[1:])
" -v --always-copy -U distribute
  Extracting in /tmp/tmp.tbPWu1oZLn/tmpEdHBr2
  Now working in /tmp/tmp.tbPWu1oZLn/tmpEdHBr2/distribute-0.6.24
  Installing Distribute
  running install
  running bdist_egg
  running egg_info
  writing distribute.egg-info/PKG-INFO
  writing top-level names to distribute.egg-info/top_level.txt
  writing dependency_links to distribute.egg-info/dependency_links.txt
  writing entry points to distribute.egg-info/entry_points.txt
  reading manifest file 'distribute.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'Makefile' under directory 'docs'
  warning: no files found matching 'indexsidebar.html' under directory 'docs'
  writing manifest file 'distribute.egg-info/SOURCES.txt'
  installing library code to build/bdist.linux-armv7l/egg
  running install_lib
  running build_py
  creating build
  creating build/lib.linux-armv7l-2.7
  copying pkg_resources.py -> build/lib.linux-armv7l-2.7
  copying easy_install.py -> build/lib.linux-armv7l-2.7
  copying site.py -> build/lib.linux-armv7l-2.7
  creating build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/__init__.py -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/sandbox.py -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/extension.py -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/depends.py -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/dist.py -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/package_index.py -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/archive_util.py -> build/lib.linux-armv7l-2.7/setuptools
  creating build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/test_upload_docs.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/__init__.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/test_packageindex.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/server.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/test_build_ext.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/test_easy_install.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/test_resources.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/test_sandbox.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/doctest.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  copying setuptools/tests/test_develop.py -> build/lib.linux-armv7l-2.7/setuptools/tests
  creating build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/setopt.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/easy_install.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/bdist_egg.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/develop.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/install_egg_info.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/register.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/__init__.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/install_lib.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/build_ext.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/build_py.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/rotate.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/saveopts.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/egg_info.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/sdist.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/install_scripts.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/install.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/upload_docs.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/bdist_wininst.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/upload.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/alias.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/bdist_rpm.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/command/test.py -> build/lib.linux-armv7l-2.7/setuptools/command
  copying setuptools/gui-64.exe -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/gui-32.exe -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/cli.exe -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/cli-64.exe -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/gui.exe -> build/lib.linux-armv7l-2.7/setuptools
  copying setuptools/cli-32.exe -> build/lib.linux-armv7l-2.7/setuptools
  creating build/bdist.linux-armv7l
  creating build/bdist.linux-armv7l/egg
  copying build/lib.linux-armv7l-2.7/site.py -> build/bdist.linux-armv7l/egg
  copying build/lib.linux-armv7l-2.7/easy_install.py -> build/bdist.linux-armv7l/egg
  copying build/lib.linux-armv7l-2.7/pkg_resources.py -> build/bdist.linux-armv7l/egg
  creating build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/gui-64.exe -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/gui-32.exe -> build/bdist.linux-armv7l/egg/setuptools
  creating build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/test_upload_docs.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/__init__.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/test_packageindex.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/server.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/test_build_ext.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/test_easy_install.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/test_resources.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/test_sandbox.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/doctest.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/tests/test_develop.py -> build/bdist.linux-armv7l/egg/setuptools/tests
  copying build/lib.linux-armv7l-2.7/setuptools/__init__.py -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/cli.exe -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/sandbox.py -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/extension.py -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/cli-64.exe -> build/bdist.linux-armv7l/egg/setuptools
  creating build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/setopt.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/easy_install.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/bdist_egg.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/develop.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/install_egg_info.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/register.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/__init__.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/install_lib.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/build_ext.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/build_py.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/rotate.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/saveopts.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/egg_info.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/sdist.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/install_scripts.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/install.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/upload_docs.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/bdist_wininst.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/upload.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/alias.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/bdist_rpm.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/command/test.py -> build/bdist.linux-armv7l/egg/setuptools/command
  copying build/lib.linux-armv7l-2.7/setuptools/depends.py -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/dist.py -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/package_index.py -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/archive_util.py -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/gui.exe -> build/bdist.linux-armv7l/egg/setuptools
  copying build/lib.linux-armv7l-2.7/setuptools/cli-32.exe -> build/bdist.linux-armv7l/egg/setuptools
  byte-compiling build/bdist.linux-armv7l/egg/site.py to site.pyc
  byte-compiling build/bdist.linux-armv7l/egg/easy_install.py to easy_install.pyc
  byte-compiling build/bdist.linux-armv7l/egg/pkg_resources.py to pkg_resources.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/test_upload_docs.py to test_upload_docs.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/__init__.py to __init__.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/test_packageindex.py to test_packageindex.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/server.py to server.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/test_build_ext.py to test_build_ext.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/test_easy_install.py to test_easy_install.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/test_resources.py to test_resources.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/test_sandbox.py to test_sandbox.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/doctest.py to doctest.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/tests/test_develop.py to test_develop.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/__init__.py to __init__.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/sandbox.py to sandbox.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/extension.py to extension.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/setopt.py to setopt.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/easy_install.py to easy_install.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/bdist_egg.py to bdist_egg.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/develop.py to develop.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/install_egg_info.py to install_egg_info.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/register.py to register.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/__init__.py to __init__.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/install_lib.py to install_lib.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/build_ext.py to build_ext.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/build_py.py to build_py.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/rotate.py to rotate.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/saveopts.py to saveopts.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/egg_info.py to egg_info.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/sdist.py to sdist.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/install_scripts.py to install_scripts.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/install.py to install.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/upload_docs.py to upload_docs.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/bdist_wininst.py to bdist_wininst.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/upload.py to upload.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/alias.py to alias.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/bdist_rpm.py to bdist_rpm.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/command/test.py to test.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/depends.py to depends.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/dist.py to dist.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/package_index.py to package_index.pyc
  byte-compiling build/bdist.linux-armv7l/egg/setuptools/archive_util.py to archive_util.pyc
  creating build/bdist.linux-armv7l/egg/EGG-INFO
  copying distribute.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
  copying distribute.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
  copying distribute.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
  copying distribute.egg-info/entry_points.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
  copying distribute.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
  copying distribute.egg-info/zip-safe -> build/bdist.linux-armv7l/egg/EGG-INFO
  creating dist
  creating 'dist/distribute-0.6.24-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
  removing 'build/bdist.linux-armv7l/egg' (and everything under it)
  Processing distribute-0.6.24-py2.7.egg
  creating /tmp/tmp.tbPWu1oZLn/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg
  Extracting distribute-0.6.24-py2.7.egg to /tmp/tmp.tbPWu1oZLn/lib/python2.7/site-packages
  Adding distribute 0.6.24 to easy-install.pth file
  Installing easy_install script to /tmp/tmp.tbPWu1oZLn/bin
  Installing easy_install-2.7 script to /tmp/tmp.tbPWu1oZLn/bin

  Installed /tmp/tmp.tbPWu1oZLn/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg
  Processing dependencies for distribute==0.6.24
  Finished processing dependencies for distribute==0.6.24
...Installing distribute...done.
Installing existing pip-1.1.debian1.tar.gz distribution: /usr/share/python-virtualenv/pip-1.1.debian1.tar.gz
Installing pip...
  Running command /tmp/tmp.tbPWu1oZLn/bin/easy_install /usr/share/python-vi...p-1.1.debian1.tar.gz
  Processing pip-1.1.debian1.tar.gz
  Running pip-1.1/setup.py -q bdist_egg --dist-dir /tmp/tmp.tbPWu1oZLn/easy_install-NFpABL/pip-1.1/egg-dist-tmp-x7w_3u
  warning: no files found matching '*.html' under directory 'docs'
  warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
  no previously-included directories found matching 'docs/_build/_sources'
  Adding pip 1.1 to easy-install.pth file
  Installing pip script to /tmp/tmp.tbPWu1oZLn/bin
  Installing pip-2.7 script to /tmp/tmp.tbPWu1oZLn/bin

  Installed /tmp/tmp.tbPWu1oZLn/lib/python2.7/site-packages/pip-1.1-py2.7.egg
  Processing dependencies for pip==1.1
  Finished processing dependencies for pip==1.1
...Installing pip...done.
Writing /tmp/tmp.tbPWu1oZLn/bin/activate
Writing /tmp/tmp.tbPWu1oZLn/bin/activate.fish
Writing /tmp/tmp.tbPWu1oZLn/bin/activate_this.py
Writing /tmp/tmp.tbPWu1oZLn/bin/activate.csh

Then, getting back to the original issue, here's what happens with letsencrypt-auto cert renewal:

# /root/letsencrypt/letsencrypt-auto --renew-by-default -a webroot --webroot-path /ReadyNAS-Volume/public_html --email email@example.com --text --agree-tos -d example.com -d www.example.com auth
Bootstrapping dependencies for Debian-based OSes...
Ign http://apt.readynas.com 6.4.2 InRelease
Hit http://apt.readynas.com 6.4.2 Release.gpg
Hit http://apt.readynas.com 6.4.2 Release
Hit http://apt.readynas.com 6.4.2/updates armel Packages
Hit http://apt.readynas.com 6.4.2/apps armel Packages
Hit http://apt.readynas.com 6.4.2/main armel Packages
Hit http://apt.readynas.com 6.4.2/updates armhf Packages
Hit http://apt.readynas.com 6.4.2/apps armhf Packages
Hit http://apt.readynas.com 6.4.2/main armhf Packages
Ign http://mirrors.kernel.org wheezy InRelease
Hit http://mirrors.kernel.org wheezy Release.gpg
Hit http://mirrors.kernel.org wheezy Release
Hit http://mirrors.kernel.org wheezy/main armel Packages
Hit http://mirrors.kernel.org wheezy/main armhf Packages
Hit http://security.debian.org wheezy/updates InRelease
Hit http://security.debian.org wheezy/updates/main armel Packages
Hit http://security.debian.org wheezy/updates/contrib armel Packages
Hit http://security.debian.org wheezy/updates/non-free armel Packages
Hit http://security.debian.org wheezy/updates/main armhf Packages
Hit http://security.debian.org wheezy/updates/contrib armhf Packages
Hit http://security.debian.org wheezy/updates/non-free armhf Packages
Reading package lists... Done
/root/letsencrypt/letsencrypt-auto: 182: /root/letsencrypt/letsencrypt-auto: lsb_release: not found
/root/letsencrypt/letsencrypt-auto: 184: /root/letsencrypt/letsencrypt-auto: lsb_release: not found
No libaugeas0 version is available that's new enough to run the
Let's Encrypt apache plugin...
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version.
ca-certificates is already the newest version.
gcc is already the newest version.
augeas-lenses is already the newest version.
libaugeas0 is already the newest version.
dialog is already the newest version.
libffi-dev is already the newest version.
python is already the newest version.
python-dev is already the newest version.
python-virtualenv is already the newest version.
The following package was automatically installed and is no longer required:
  librtmp0
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Checking for new version...
Creating virtual environment...
Installing Python packages...
Installation succeeded.
Requesting root privileges to run letsencrypt...
   /root/.local/share/letsencrypt/bin/letsencrypt --renew-by-default -a webroot --webroot-path /ReadyNAS-Volume/public_html --email email@example.com --text --agree-tos -d example.com -d www.example.com auth

At that point it hangs forever. Have to ^C out:

^CTraceback (most recent call last):
  File "/root/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module>
    sys.exit(main())
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/main.py", line 692, in main
    return config.func(config, plugins)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/main.py", line 509, in obtain_cert
    _, action = _auth_from_domains(le_client, config, domains, lineage)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/main.py", line 90, in _auth_from_domains
    renewal.renew_cert(config, domains, le_client, lineage)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/renewal.py", line 236, in renew_cert
    new_certr, new_chain, new_key, _ = le_client.obtain_certificate(domains)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/client.py", line 246, in obtain_certificate
    self.config.allow_subset_of_names)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/auth_handler.py", line 74, in get_authorizations
    self._respond(resp, best_effort)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/auth_handler.py", line 127, in _respond
    resp, chall_update)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/letsencrypt/auth_handler.py", line 151, in _send_responses
    self.acme.answer_challenge(achall.challb, resp)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/client.py", line 234, in answer_challenge
    response = self.net.post(challb.uri, response)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/client.py", line 650, in post
    response = self._send_request('POST', url, data=data, **kwargs)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/client.py", line 609, in _send_request
    response = requests.request(method, url, *args, **kwargs)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/api.py", line 53, in request
    return session.request(method=method, url=url, **kwargs)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
    resp = self.send(prep, **send_kwargs)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/adapters.py", line 376, in send
    timeout=timeout
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
    body=body, headers=headers)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 784, in _validate_conn
    conn.connect()
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 217, in connect
    conn = self._new_conn()
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 137, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/requests/packages/urllib3/util/connection.py", line 81, in create_connection
    sock.connect(sa)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
KeyboardInterrupt

Any idea why letsencrypt-auto is hanging?

@bmw
Copy link
Member

bmw commented Apr 13, 2016

Oh wow. That's a major step forward. letsencrypt is now installed and running on your system. Does this problem happen on every run?

@gbeddow
Copy link

gbeddow commented Apr 13, 2016

Just to be clear, I installed letsencrypt back in December, and certificate creation and renewal were working fine in December and January; it's only in the past couple days (as the January + 90 day expiration draws close) that letsencrypt-auto renewal has been failing.

Anyway, how long would you expect it to take to renew? The first time I let it run for a half hour before killing it, way longer than any reasonable expectation. The second time is still running as I type this, but it's been 10 or 15 minutes...

@bmw
Copy link
Member

bmw commented Apr 13, 2016

Just to be clear, I installed letsencrypt back in December, and certificate creation and renewal were working fine in December and January; it's only in the past couple days (as the January + 90 day expiration draws close) that letsencrypt-auto renewal has been failing.

Well we did do a release last week, however, it seems unlikely that any of the changes that were made would cause the problems you are having.

One thing you can do to test if the new release is the cause of the problems on your system is to download the previous version of letsencrypt-auto available here and run the same command you did above, however, add --no-self-upgrade to the command line. Doing this will use the previous version of letsencrypt-auto and our Python packages.

Anyway, how long would you expect it to take to renew? The first time I let it run for a half hour before killing it, way longer than any reasonable expectation. The second time is still running as I type this, but it's been 10 or 15 minutes...

This is obviously dependent on the system you're running it on, however, the script shouldn't take more than a minute after you see this output:

Requesting root privileges to run letsencrypt...

@gbeddow
Copy link

gbeddow commented Apr 13, 2016

It finished - successfully - thanks! Took about 30 minutes. Looking at the log files, it seems to spend large amounts of time waiting for responses from the letsencrypt server.

Thanks again. Assuming it works, the timing thing shouldn't be an issue since it's normally run from cron.

@bmw
Copy link
Member

bmw commented Apr 13, 2016

That's really strange. There is an issue about our connection pooling not being as efficient as possible, but 30 minutes certainly isn't normal. Regardless, I'm glad you were able to renew your certs!

Thanks for bearing with me while I suggested different things.

@pde
Copy link
Member

pde commented Dec 3, 2016

Is this problem still reproducible, or should we close this?

@gbeddow
Copy link

gbeddow commented Dec 3, 2016

This has been working for me since then.

@iqqmuT
Copy link

iqqmuT commented Jun 29, 2017

I got the same error. I have Debian 7.11 and I was following the instructions from here:
https://certbot.eff.org/#debianwheezy-nginx

$ sudo ./certbot-auto --nginx
Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release                                               
Hit http://security.debian.org wheezy/updates/main amd64 Packages                                   
Hit http://security.debian.org wheezy/updates/contrib amd64 Packages                                                                   
Hit http://security.debian.org wheezy/updates/non-free amd64 Packages                                                                                  
Hit http://security.debian.org wheezy/updates/contrib Translation-en                                                                                   
Hit http://security.debian.org wheezy/updates/main Translation-en                                                  
Hit http://security.debian.org wheezy/updates/non-free Translation-en                            
Hit http://http.debian.net wheezy-backports Release.gpg                                          
Hit http://ftp.debian.org wheezy Release.gpg    
Hit http://ftp.debian.org wheezy Release
Hit http://http.debian.net wheezy-backports Release
Hit http://ftp.debian.org wheezy/main amd64 Packages
Hit http://http.debian.net wheezy-backports/main amd64 Packages/DiffIndex
Hit http://ftp.debian.org wheezy/contrib amd64 Packages            
Hit http://ftp.debian.org wheezy/non-free amd64 Packages
Hit http://http.debian.net wheezy-backports/main Translation-en/DiffIndex
Hit http://ftp.debian.org wheezy/contrib Translation-en            
Hit http://ftp.debian.org wheezy/main Translation-en
Hit http://ftp.debian.org wheezy/non-free Translation-en
Reading package lists... Done                
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version.
gcc is already the newest version.
python-virtualenv is already the newest version.
libffi-dev is already the newest version.
libssl-dev is already the newest version.
openssl is already the newest version.
augeas-lenses is already the newest version.
libaugeas0 is already the newest version.
python is already the newest version.
python-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Creating virtual environment...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 2283, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 938, in main
    never_download=options.never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 1054, in create_environment
    install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 643, in install_pip
    filter_stdout=_filter_setup)
  File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 976, in call_subprocess
    cwd=cwd, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

@iqqmuT
Copy link

iqqmuT commented Jun 30, 2017

Creating the symlink fixed the problem, as @bmw suggested.

@AnthyG
Copy link

AnthyG commented Dec 29, 2017

For me too, the symlink method mentiond by @bmw worked!
Many thanks 😄

@bmw
Copy link
Member

bmw commented Jul 19, 2018

Debian Wheezy has reached its end of life and is no longer supported by Debian. We are no longer trying to maintain support either so I'm closing this issue.

@bmw bmw closed this as completed Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants