retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.7k stars 370 forks source link

Too many levels of symbolic links #124

Open ghost opened 8 years ago

ghost commented 8 years ago

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

savichev commented 8 years ago

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/

ghost commented 8 years ago

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#

savichev commented 8 years ago

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
alexsalex commented 8 years ago

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'

alexsalex commented 8 years ago

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