CiscoDevNet / yang-explorer

An open-source Yang Browser and RPC Builder Application
Apache License 2.0
437 stars 177 forks source link

Do you want to continue as root ? (n/N) #96

Open jas2061461 opened 5 years ago

jas2061461 commented 5 years ago

I have been unable to install YANG-explorer when installing as root or even another user. Output is below. Why is this not working?

root@ubuntu:~/data_models/yang-explorer# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:        16.04
Codename:       xenial

Installing as root, I am not given the "Y" option to continue as root to create the database. If I am logged in as a non-root user and issue "sudo bash setup.sh", I receive the same error.

root@ubuntu:~/data_models/yang-explorer# whoami
root
root@ubuntu:~/data_models/yang-explorer# bash setup.sh 
Installing yang-explorer ..

<output omitted for brevity>

Successfully built ydk-models-cisco-ios-xr
Installing collected packages: ydk-models-cisco-ios-xr
  Found existing installation: ydk-models-cisco-ios-xr 6.2.1
    Uninstalling ydk-models-cisco-ios-xr-6.2.1:
      Successfully uninstalled ydk-models-cisco-ios-xr-6.2.1
Successfully installed ydk-models-cisco-ios-xr-6.2.1
Installing dependencies .. done
Setting up initial database ..

Warning: Setting up database as root, this is not recommended.
Alternatively you can re-run this script as non-root
to setup database without root privilege.

Do you want to continue as root ? (n/N) 
root@ubuntu:~/data_models/yang-explorer# bash start.sh
Yang-Explorer database is not initialized .. please run setup.sh first !!

When not root, this still fails.

c0x@ubuntu:~/yang-explorer$ whoami
c0x
c0x@ubuntu:~/yang-explorer$ pwd
/home/c0x/yang-explorer
c0x@ubuntu:~/yang-explorer$ bash setup.sh
Installing yang-explorer ..

<output omitted for brevity>

Building wheels for collected packages: ydk-models-cisco-ios-xr
  Building wheel for ydk-models-cisco-ios-xr (setup.py) ... done
  Stored in directory: /home/c0x/.cache/pip/wheels/e0/8e/4e/192b709039a989d41f946ab67964846ed98dcffc03b9958219
Successfully built ydk-models-cisco-ios-xr
Installing collected packages: ydk-models-cisco-ios-xr
  Found existing installation: ydk-models-cisco-ios-xr 6.2.1
    Uninstalling ydk-models-cisco-ios-xr-6.2.1:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '_cisco_xr_netconf_monitoring_deviations.py'
Consider using the `--user` option or check the permissions.

Installing dependencies .. done
Setting up initial database ..
Creating data directories ..
Creating database ..
Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
Creating default users ..
Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
Setup completed.. 

Use start.sh to start yang-explorer server
dona-cloud commented 3 years ago

did you ever get this fixed?