【问题标题】:Error installing apache 2 in ubuntu 14.04: dpkg:- error processing package javascript-common (--configure):在 ubuntu 14.04 中安装 apache 2 时出错:dpkg:- 错误处理包 javascript-common (--configure):
【发布时间】:2015-03-23 21:23:39
【问题描述】:

我在卸载 apache 2 后尝试重新安装它。但是在使用命令安装它时-

sudo apt-get install apache2

我遇到了错误-

rahul@rahulpc:~$ sudo apt-get install apache2
[sudo] password for rahul: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2 is already the newest version.
The following packages were automatically installed and are no longer required:
  libblas3 liblinear-tools liblinear1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 474 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up javascript-common (11) ...
dpkg: error processing package javascript-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 javascript-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

我想我在卸载 apache 2 时删除了一些基本目录。请任何人帮助我恢复文件并安装 apache 2。

【问题讨论】:

  • 根据消息,您似乎没有卸载 apache2。尝试使用 sudo apt-get update sudo apt-get install --reinstall apache2

标签: apache installation ubuntu-14.04 apt


【解决方案1】:

尝试执行以下命令:

sudo apt-get clean && sudo apt-get autoclean

  • Clean 清除检索到的包文件的本地存储库。
  • 与 clean 一样,autoclean 会清除检索到的包文件的本地存储库。不同之处在于它只删除不能再下载的包文件,而且基本上没用。这样可以长期维护缓存,而不会失控。

sudo apt-get purge apache2

  • Purge 与 remove 相同,只是包被删除和清除(任何配置文件也被删除)。

在安装 apache2 之前,尝试运行这个: sudo apt-get update

  • 更新用于从源重新同步包索引文件。

sudo apt-get install apache2

【讨论】:

    猜你喜欢
    • 2015-05-29
    • 1970-01-01
    • 2016-06-07
    • 1970-01-01
    • 2017-08-27
    • 1970-01-01
    • 2023-03-10
    • 2019-10-11
    • 2016-09-10
    相关资源
    最近更新 更多