donaldzou / WGDashboard

Simple dashboard for WireGuard VPN written in Python & Vue.js
https://donaldzou.github.io/WGDashboard-Documentation/
Apache License 2.0
1.63k stars 248 forks source link

unable to execute ./venv/bin/gunicorn: No such file or directory #460

Closed slima closed 1 week ago

slima commented 1 week ago
~/WGDashboard/src$ ./wgd.sh install
------------------------------------------------------------
[WGDashboard] Starting to install WGDashboard
[WGDashboard] OS: ubuntu
[WGDashboard] ✔ Python is installed
[WGDashboard] ✔ Python Virtual Environment is installed
[WGDashboard] ✔ Python Package Manager (PIP) is installed
[WGDashboard] WireGuard is already installed.
[WGDashboard] Upgrading Python Package Manage (PIP)
[WGDashboard] Installing latest Python dependencies
[WGDashboard] WGDashboard installed successfully!
[WGDashboard] Enter ./wgd.sh start to start the dashboard
------------------------------------------------------------
~/WGDashboard/src$ ./wgd.sh start
[WGDashboard] WireGuard is already installed.
------------------------------------------------------------
[WGDashboard] Starting WGDashboard with Gunicorn in the background.
sudo: unable to execute ./venv/bin/gunicorn: No such file or directory

$ python3 --version Python 3.10.12

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy

DaanSelen commented 1 week ago

Please do source ./venv/bin/activate that way you activate the Python Virtual Environment which allows you to call the dependencies.

slima commented 1 week ago
~/WGDashboard/src$ source ./venv/bin/activate
(venv) ~/WGDashboard/src$ ./wgd.sh start
[WGDashboard] WireGuard is already installed.
------------------------------------------------------------
[WGDashboard] Starting WGDashboard with Gunicorn in the background.
sudo: unable to execute ./venv/bin/gunicorn: No such file or directory
slima commented 1 week ago

but file is there:

~/WGDashboard/src/venv/bin$ ls
activate  activate.csh  activate.fish  Activate.ps1  flask  **gunicorn**  pip  pip3  pip3.10  python  python3  python3.10
DaanSelen commented 1 week ago

Hmmm, okay. That's weird.

I should have done it itself, but to make sure please execute:

make sure all WGDashboard processed are stopped and then:

bash ./wgd.sh install

bash ./wgd.sh start

I see you directly executed it, perhaps you use another shell other than Bash, so make sure you use Bash as marked in the Shebang.

slima commented 1 week ago

Okay, I know what happened. I moved the repository between system users, and the virtual environment contained paths to a user who no longer existed in the system, which is why it couldn't find the file.

DaanSelen commented 1 week ago

Okay, I know what happened. I moved the repository between system users, and the virtual environment contained paths to a user who no longer existed in the system, which is why it couldn't find the file.

Ahh good to know, perhaps we need to do a ownership check somewhere.

DaanSelen commented 1 week ago

@slima is this solved?

slima commented 1 week ago

yes.