【问题标题】:Cannot start apache2 in WSL无法在 WSL 中启动 apache2
【发布时间】:2017-09-15 07:14:30
【问题描述】:

当我尝试从 WSL 启动 apache2 时出现以下错误:

➜  ~ sudo service apache2 start
 * Starting Apache httpd web server apache2
 *
 * The apache2 configtest failed.
Output of config test was:
apache2: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)' failed.
Aborted (core dumped)
Action 'configtest' failed.
The Apache error log may have more information.

Apache 错误日志为空。

我还在 ports.conf 中设置了 Listen 0.0.0.0:8080Listen 0.0.0.0:8443 并更改了虚拟主机的端口以匹配监听端口。

系统版本:

➜  ~ uname -a
Linux yce-mac 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
➜  ~ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

Windows 操作系统版本:10.0.15063(创作者更新)

【问题讨论】:

    标签: windows apache apache2 windows-subsystem-for-linux getaddrinfo


    【解决方案1】:

    您是否更新了旧版本的 Windows10?还是全新安装? 尝试删除并重新安装 WSL

    • lxrun /uninstall /full /y
    • lxrun /install

    【讨论】:

    • 是的,我已经从旧版本更新了,但是 apache 无法正常工作,所以我已经完全卸载了 WSL,然后重新安装了它,现在干净的实例给出了这个错误。
    【解决方案2】:

    好的,看起来(至少对我而言)问题是由名为 Pulse Secure 的 VPN 解决方案引起的。

    卸载之后,apache又开始工作了。

    【讨论】:

      猜你喜欢
      • 2021-11-21
      • 2017-12-20
      • 2017-06-28
      • 2020-10-06
      • 2019-02-18
      • 1970-01-01
      • 2022-12-11
      • 1970-01-01
      相关资源
      最近更新 更多