apache2 配置测试失败(第 187 行)

apache2 配置测试失败(第 187 行)

希望有人能帮助我。所以我想安装需要禁用 magicquotes 的 MediaWiki,所以我做了以下操作:

    463  apt-add-repository ppa:ondrej/php5-oldstable
    464  sudo apt-add-repository ppa:ondrej/php5
    465  sudo apt-add-repository ppa:ondrej/php5-5.6
    466  apt-add-repository ppa:ondrej/php5-oldstable
    467  apt-get update
    468  apt-get install php5

    484  nano /etc/php5/apache2/php.ini  // went to turn off magicquotes. Didn't work.
    485  apt-get purge libapache2-mod-php5 php5 &&     apt-get install libapache2-                              mod-php5 php5
    488  service apache2 restart
    489  service apache2 stop
    490  pidof apache2
    491  skill -9 pid
    492  service apache2 start

.............我破坏了 Apache。网站现在无法工作,我陷入困境。

以下是我目前所做的:

    sudo add-apt-repository --remove ppa:ondrej/php5-oldstable
    sudo add-apt-repository --remove ppa:ondrej/php5
    sudo add-apt-repository --remove ppa:ondrej/php5-5.6
    apt-get update
    apt-get upgrade
    apt-get purge libapache2-mod-php5 php5 && apt-get install libapache2-mod-php5 php5

这做了以下事情:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      libt1-5 suphp-common
    Use 'apt-get autoremove' to remove them.
    The following packages will be REMOVED:
      libapache2-mod-php5* php5*
    0 upgraded, 0 newly installed, 2 to remove and 3 not upgraded.
    After this operation, 9,724 kB disk space will be freed.
    Do you want to continue [Y/n]? y
    (Reading database ... 159707 files and directories currently installed.)
    Removing php5 ...
    Removing libapache2-mod-php5 ...
    php5_invoke prerm: Disable module pdo for apache2 SAPI
    php5_invoke prerm: Disable module opcache for apache2 SAPI
    php5_invoke prerm: Disable module mssql for apache2 SAPI
    php5_invoke prerm: Disable module pdo_dblib for apache2 SAPI
    php5_invoke prerm: Disable module xsl for apache2 SAPI
    php5_invoke prerm: Disable module xmlrpc for apache2 SAPI
    php5_invoke prerm: Disable module sqlite3 for apache2 SAPI
    php5_invoke prerm: Disable module pdo_sqlite for apache2 SAPI
    php5_invoke prerm: Disable module snmp for apache2 SAPI
    php5_invoke prerm: Disable module recode for apache2 SAPI
    php5_invoke prerm: Disable module pgsql for apache2 SAPI
    php5_invoke prerm: Disable module pdo_pgsql for apache2 SAPI
    php5_invoke prerm: Disable module odbc for apache2 SAPI
    php5_invoke prerm: Disable module pdo_odbc for apache2 SAPI
    php5_invoke prerm: Disable module mysql for apache2 SAPI
    php5_invoke prerm: Disable module mysqli for apache2 SAPI
    php5_invoke prerm: Disable module pdo_mysql for apache2 SAPI
    php5_invoke prerm: Disable module ldap for apache2 SAPI
    php5_invoke prerm: Disable module gmp for apache2 SAPI
    php5_invoke prerm: Disable module gd for apache2 SAPI
    php5_invoke prerm: Disable module curl for apache2 SAPI
    php5_invoke prerm: Disable module json for apache2 SAPI
    php5_invoke prerm: Disable module mcrypt for apache2 SAPI
    php5_invoke prerm: Disable module imap for apache2 SAPI
    Module php5 disabled.
    apache2_invoke prerm: Disable module php5
    apache2_reload: Your configuration is broken. Not restarting Apache 2
    apache2_reload: apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of         /etc/apache2/mods-enabled/authz_default.load: Cannot load /usr/lib/apache2/modules/mod_authz_default.so into         server: /usr/lib/apache2/modules/mod_authz_default.so: cannot open shared object file: No such file or directory
    Purging configuration files for libapache2-mod-php5 ...
    apache2_invoke postrm: Purging state for php5
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package libapache2
    E: Unable to locate package mod-php5

现在我被困住了。是的,我弄坏了它,但有什么办法可以解决这个问题吗?谢谢!

相关内容