[GH-ISSUE #124] Too many levels of symbolic links #79

Open
opened 2026-02-27 15:57:15 +03:00 by kerem · 5 comments
Owner

Originally created by @ghost on GitHub (Jul 27, 2016).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/124

I just upgrade from ubuntu 14.04 to 16.04 and WVC stop working. I update all sturtup scripts to systemd.
So...
When I run manualy: /srv/webvirtcloud/venv/bin/gunicorn webvirtcloud.wsgi:application -c /srv/webvirtcloud/gunicorn.conf.py

I get this one:
bash: /srv/webvirtcloud/venv/bin/gunicorn: /srv/webvirtcloud/venv/bin/python: bad interpreter: Too many levels of symbolic links

Originally created by @ghost on GitHub (Jul 27, 2016). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/124 I just upgrade from ubuntu 14.04 to 16.04 and WVC stop working. I update all sturtup scripts to systemd. So... When I run manualy: /srv/webvirtcloud/venv/bin/gunicorn webvirtcloud.wsgi:application -c /srv/webvirtcloud/gunicorn.conf.py I get this one: bash: /srv/webvirtcloud/venv/bin/gunicorn: /srv/webvirtcloud/venv/bin/python: bad interpreter: Too many levels of symbolic links
Author
Owner

@savichev commented on GitHub (Jul 28, 2016):

Hi!
Re- run this commands

cd /srv/webvirtcloud
source venv/bin/activate
sudo chown -R www-data:www-data /srv/webvirtcloud/venv

If does not help,

cd /srv/webvirtcloud
source venv/bin/activate
which python

https://www.reddit.com/r/learnpython/comments/2iugkj/very_confused_about_python_dev_environments_and/

<!-- gh-comment-id:235795555 --> @savichev commented on GitHub (Jul 28, 2016): Hi! Re- run this commands ``` cd /srv/webvirtcloud source venv/bin/activate sudo chown -R www-data:www-data /srv/webvirtcloud/venv ``` If does not help, ``` cd /srv/webvirtcloud source venv/bin/activate which python ``` https://www.reddit.com/r/learnpython/comments/2iugkj/very_confused_about_python_dev_environments_and/
Author
Owner

@ghost commented on GitHub (Jul 28, 2016):

Thank you so much, but it doesn't help. I get another error:

root@vmhost:/srv/webvirtcloud# virtualenv venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /srv/webvirtcloud/venv/bin/python2
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 942, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1261, in install_python
shutil.copyfile(executable, py_executable)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 40] Too many levels of symbolic links: '/srv/webvirtcloud/venv/bin/python2'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
ImportError: No module named apport.fileutils

Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 942, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1261, in install_python
shutil.copyfile(executable, py_executable)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 40] Too many levels of symbolic links: '/srv/webvirtcloud/venv/bin/python2'
root@vmhost:/srv/webvirtcloud#

<!-- gh-comment-id:235975451 --> @ghost commented on GitHub (Jul 28, 2016): Thank you so much, but it doesn't help. I get another error: root@vmhost:/srv/webvirtcloud# virtualenv venv Running virtualenv with interpreter /usr/bin/python2 New python executable in /srv/webvirtcloud/venv/bin/python2 Traceback (most recent call last): File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module> main() File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main symlink=options.symlink) File "/usr/lib/python3/dist-packages/virtualenv.py", line 942, in create_environment site_packages=site_packages, clear=clear, symlink=symlink)) File "/usr/lib/python3/dist-packages/virtualenv.py", line 1261, in install_python shutil.copyfile(executable, py_executable) File "/usr/lib/python2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 40] Too many levels of symbolic links: '/srv/webvirtcloud/venv/bin/python2' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes ImportError: No module named apport.fileutils Original exception was: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module> main() File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main symlink=options.symlink) File "/usr/lib/python3/dist-packages/virtualenv.py", line 942, in create_environment site_packages=site_packages, clear=clear, symlink=symlink)) File "/usr/lib/python3/dist-packages/virtualenv.py", line 1261, in install_python shutil.copyfile(executable, py_executable) File "/usr/lib/python2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 40] Too many levels of symbolic links: '/srv/webvirtcloud/venv/bin/python2' root@vmhost:/srv/webvirtcloud#
Author
Owner

@savichev commented on GitHub (Jul 29, 2016):

python3
https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-16.04-Python-3-Hopes

I have not tried to work without python2. Try it completely removed from the system if it is not needed . Make a clean installation of WVC

http://askubuntu.com/questions/761106/how-to-remove-python-2-in-16-04
to completely remove Python2 and everything that depends on it.

sudo apt purge python2.7-minimal

And re-install dependency and WVC-core

sudo apt-get -y install --reinstall git python-virtualenv python-dev libxml2-dev libvirt-dev zlib1g-dev nginx supervisor libsasl2-modules

clear virtualenv

rm -rf /srv/webvirtcloud/venv

install

cd /srv/webvirtcloud
virtualenv venv
source venv/bin/activate
pip install -r conf/requirements.txt
python manage.py migrate
sudo chown -R www-data:www-data /srv/webvirtcloud
sudo service nginx restart
sudo service supervisor restart
<!-- gh-comment-id:236109880 --> @savichev commented on GitHub (Jul 29, 2016): python3 https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-16.04-Python-3-Hopes I have not tried to work without python2. Try it completely removed from the system if it is not needed . Make a clean installation of WVC http://askubuntu.com/questions/761106/how-to-remove-python-2-in-16-04 to completely remove Python2 and everything that depends on it. ``` sudo apt purge python2.7-minimal ``` And re-install dependency and WVC-core ``` sudo apt-get -y install --reinstall git python-virtualenv python-dev libxml2-dev libvirt-dev zlib1g-dev nginx supervisor libsasl2-modules ``` clear virtualenv ``` rm -rf /srv/webvirtcloud/venv ``` install ``` cd /srv/webvirtcloud virtualenv venv source venv/bin/activate pip install -r conf/requirements.txt python manage.py migrate sudo chown -R www-data:www-data /srv/webvirtcloud ``` ``` sudo service nginx restart sudo service supervisor restart ```
Author
Owner

@alexsalex commented on GitHub (Aug 2, 2016):

Nope.... Get this:

(venv)root@vmhost:/srv/webvirtcloud# virtualenv venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /srv/webvirtcloud/venv/bin/python2
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 942, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1261, in install_python
shutil.copyfile(executable, py_executable)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 40] Too many levels of symbolic links: '/srv/webvirtcloud/venv/bin/python2'

<!-- gh-comment-id:236824758 --> @alexsalex commented on GitHub (Aug 2, 2016): Nope.... Get this: (venv)root@vmhost:/srv/webvirtcloud# virtualenv venv Running virtualenv with interpreter /usr/bin/python2 New python executable in /srv/webvirtcloud/venv/bin/python2 Traceback (most recent call last): File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module> main() File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main symlink=options.symlink) File "/usr/lib/python3/dist-packages/virtualenv.py", line 942, in create_environment site_packages=site_packages, clear=clear, symlink=symlink)) File "/usr/lib/python3/dist-packages/virtualenv.py", line 1261, in install_python shutil.copyfile(executable, py_executable) File "/usr/lib/python2.7/shutil.py", line 83, in copyfile with open(dst, 'wb') as fdst: IOError: [Errno 40] Too many levels of symbolic links: '/srv/webvirtcloud/venv/bin/python2'
Author
Owner

@alexsalex commented on GitHub (Aug 19, 2016):

any idea? Ubuntu released 16.04.01 LTS..... And I still can not start WebVirtCloud...

<!-- gh-comment-id:240906547 --> @alexsalex commented on GitHub (Aug 19, 2016): any idea? Ubuntu released 16.04.01 LTS..... And I still can not start WebVirtCloud...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#79
No description provided.