Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 启动httpd-检索pid文件时出错(null)_Linux_Fedora_Apache - Fatal编程技术网

Linux 启动httpd-检索pid文件时出错(null)

Linux 启动httpd-检索pid文件时出错(null),linux,fedora,apache,Linux,Fedora,Apache,我在Fedora上手动编译并安装了httpd。我第一次尝试启动它: ./apachectl start -d ../ 并接收以下错误: (20014)Internal error: Error retrieving pid file (null) Remove it before continuing if it is corrupted. 任何帮助都将不胜感激 pid文件是包含守护进程的进程id的文件(在文件体或文件名中)。守护进程使用它来确保一次只运行它的一个版本。它通过检查pid文件

我在Fedora上手动编译并安装了
httpd
。我第一次尝试启动它:

./apachectl start -d ../
并接收以下错误:

(20014)Internal error: Error retrieving pid file (null)
 Remove it before continuing if it is corrupted.

任何帮助都将不胜感激

pid文件是包含守护进程的进程id的文件(在文件体或文件名中)。守护进程使用它来确保一次只运行它的一个版本。它通过检查pid文件是否存在或使用某些os/文件系统的flock功能来锁定它来实现这一点


该错误表明它无法访问pid文件,这将向我指示权限错误。

您需要删除httpd.pid文件并重新启动apache或xampp以解决此问题。 下页解释了删除该文件的说明:


我在ubuntu中遇到了同样的问题,我尝试运行这段代码。 尝试运行:

sudo rm /opt/lampp/httpd.pid
然后


如果您的
(13)权限被拒绝:
那么只需添加“sudo”,然后添加您的推荐。

我在termux上遇到了这个问题。 是的

然后

su
rm /sbin/.magisk/mirror/data/data/com.termux/files/usr/var/run/apache2/httpd.pid

我递归地将文件夹的权限设置为755。仍然是相同的错误。使用strace运行它,它将显示它试图打开的pid文件(或者它试图执行的操作失败),这是一个典型的例子,说明为什么不应该链接到外部答案。。。此页面不再存在。是否尝试使用sudo运行它?
su
find -iname httpd.pin
su
rm /sbin/.magisk/mirror/data/data/com.termux/files/usr/var/run/apache2/httpd.pid