我正在尝试在DigitalOcean上安装Flask应用程序,但是每次运行以下命令时,我都会遇到相同的错误,我尝试了网上提到的所有内容,但没有成功
$ sudo systemctl start testflask
$ sudo systemctl enable testflask
$ sudo systemctl status testflask
那是我在运行命令时遇到的错误
● testflask.service - uWSGI instance to serve testflask
Loaded: loaded (/etc/systemd/system/testflask.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-11-09 14:47:04 UTC; 126ms ago
Main PID: 30495 (code=exited, status=203/EXEC)
Nov 09 14:47:04 aipi systemd[1]: Started uWSGI instance to serve testflask.
Nov 09 14:47:04 aipi systemd[1]: testflask.service: Main process exited, code=exited, status=203/EXEC
Nov 09 14:47:04 aipi systemd[1]: testflask.service: Unit entered failed state.
Nov 09 14:47:04 aipi systemd[1]: testflask.service: Failed with result 'exit-code'.
testflask.service文件
[Unit]
Description=uWSGI instance to serve testflask
After=network.target
[Service]
User=alexy
Group=www-data
WorkingDirectory=/home/alexy/testflask
Environment="PATH=/home/alexy/testflask/venv/bin"
ExecStart=/home/alexy/testflask/venv/bin/uwsgi --log-level debug --ini uwsgi.ini
[Install]
WantedBy=multi-user.target
/ home / alexy / testflask /
中的uwsgi.ini[uwsgi]
http-socket = :$(PORT)
socket = wsgi.sock
chmod-socket = 660
vacuum = true
processes = 5
master = true
die-on-term = true
module = wsgi:app
memory-report = true
wsgi-disable-file-wrapper = true
谢谢您的帮助