小编Siv*_*nan的帖子

安装Apache时出错;错误是“E:子进程/usr/bin/dpkg返回了错误代码(1)”

我按照在线文章 从我的系统中删除了我的 Apache
我通过这些命令删除了 Apache

sudo apt-get purge apache2 apache2-utils
sudo rm -rf /etc/apache2-bin
sudo apt-get autoremove
Run Code Online (Sandbox Code Playgroud)

然后在文章中他们提到删除whereis apache2.

运行命令后whereis apache2我发现

/usr/sbin/apache2/usr/share/apache2
/usr/lib/apache2
/usr/share/man/man8/apache2.8.gz
/etc/apache2
Run Code Online (Sandbox Code Playgroud)

我通过命令删除了上述目录和文件sudo rm -rf file_or_directory_name

然后我试过了

sudo apt-get install apache2
Run Code Online (Sandbox Code Playgroud)

当系统询问时,我点击了“y”do you want to continue?

然后错误来了:

Setting up apache2 (2.4.7-1ubuntu4.4) ...
cp: cannot stat ‘/usr/share/apache2/default-site/index.html’: No such file or directory
dpkg: error processing package apache2 (--configure): subprocess installed post-installation script returned error exit status 1 …
Run Code Online (Sandbox Code Playgroud)

ubuntu dpkg apt apache-httpd

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

apache-httpd ×1

apt ×1

dpkg ×1

ubuntu ×1