简体   繁体   English

nginx已安装但未找到命令

[英]nginx is installed but command not found

so i'm trying to install matrix synapse on ubuntu.所以我正在尝试在 ubuntu 上安装矩阵突触。 i followed these steps我按照这些步骤

i wrote all the commands just fine until "the step for Activate the virtual host file and test the configuration."我写的所有命令都很好,直到“激活虚拟主机文件并测试配置的步骤”。 Now when i write this Command现在当我写这个命令时

nginx -t

i face with this Error :我面临这个错误:

bash:: command not found bash:: 找不到命令

i checked that nginx is installed or not but apparently it is installed .我检查了 nginx 是否已安装,但显然已安装。 But the Commands are somehow unknown for ubuntu !但是命令对于 ubuntu 来说是未知的! Can you guys help me with this?你们能帮我解决这个问题吗?

first check the location of the installed nginx executable if you installed with apt then it should be in /usr/sbin/ check that your path contain this directory.首先检查已安装的 nginx 可执行文件的位置,如果您使用 apt 安装,那么它应该在/usr/sbin/检查您的路径是否包含此目录。 if it doesnt, type in this command如果没有,请输入此命令

PATH=$PATH:~/usr/sbin

如果 nginx 在路径 /usr/sbin/ 中,那么试试这个命令:

PATH=/usr/sbin/:$PATH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM