我有 iSH,它实际上是 i(Pad)OS 上的一个 prooted(?) Alpine Linux,它与apk
包管理器配合得很好(不要与 Android APK 混淆),网络/互联网连接也很好。但是当我安装 Apache(版本 2.4.56)时,我收到以下错误:
:~# rc-service apache2 start
grep: /proc/filesystems: No such file or directory
* Checking local filesystems ... [ ok ]
grep: /proc/filesystems: No such file or directory
grep: /proc/filesystems: No such file or directory
* Remounting filesystems ... [ ok ]
grep: /proc/filesystems: No such file or directory
grep: /proc/filesystems: No such file or directory
* Mounting local filesystems ... [ ok ]
grep: /proc/filesystems: No such file or directory
grep: /proc/filesystems: No such file or directory
* Starting networking ...
ifquery: could not parse /etc/network/interfaces
* ERROR: networking failed to start
* ERROR: cannot start apache2 as networking would not start
当我在正常运行proftpd
时启动时也发生同样的情况:sshd
~# rc-service proftpd start
grep: /proc/filesystems: No such file or directory
* Starting networking ...
ifquery: could not parse /etc/network/interfaces
* ERROR: networking failed to start
* ERROR: cannot start proftpd as networking would not start
看起来好像缺少一个文件,但是当我在 中查看我的 Ubuntu 时/etc/networks
,这个文件也丢失了,但 Apache 并没有对此抱怨。
我尝试启动网络管理器:
~# rc-service networkmanager start
* rc-service: service `networkmanager' does not exist
然后我安装了它apk add networkmanager
,但无济于事。同样的问题。
答案1
7
我遇到了同样的问题,您无需使用 openrc 即可启动 apache。
将 RUN mkdir -p /run/apache2 添加到 Dockerfile,apache 将 httpd.pid 文件存储在此目录中。最后使用以下命令启动 apache:exec /usr/sbin/httpd -D FOREGROUND
我的 Apache2 工作!