跑步:
sudo apt-get install apache2
结果:
* Apache2 is not running
invoke-rc.d: initscript apache2, action "reload" failed.
apache2_invoke headers: already enabled
* Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
[fail]
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
invoke-rc.d: initscript apache2, action "restart" failed.
* Reloading web server apache2 *
* Apache2 is not running
invoke-rc.d: initscript apache2, action "reload" failed.
dpkg: error processing package gosa (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of gosa-plugin-ssh:
gosa-plugin-ssh depends on gosa; however:
Package gosa is not configured yet.
dpkg: error processing package gosa-plugin-ssh (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
gosa
gosa-plugin-ssh
E: Sub-process /usr/bin/dpkg returned an error code (1)
ramana@lenovog500:~/KM_GIT/bbb/iot/mysql$ ^C
答案1
您是否已经厌倦了多次安装它,或者您是否已经安装了其他服务器?如果是这样,您需要关闭或删除其他服务器,(如果您想使用 Apache 作为本地主机)当我需要全新安装 Apache Web 服务器时,我只是遵循了本教程
答案2
dpkg 似乎与 gosa-plugin-ssh 存在依赖问题
Package gosa is not configured yet.
尝试
dpkg --configure -a
和
apt-get update
apt-get -f install
对以下答案的很好的解释: