【问题标题】:dpkg:- error processing package javascript-common (--configure):- while using apt-get commanddpkg:- 错误处理包 javascript-common (--configure):- 使用 apt-get 命令时
【发布时间】:2015-05-29 06:33:17
【问题描述】:

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

我遇到了错误-

安装 apache2 时出错

rahul@rahulpc:~$ sudo apt-get clean && sudo apt-get autoclean
[sudo] password for rahul: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
rahul@rahulpc:~$ sudo apt-get --reinstall install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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, 1 reinstalled, 0 to remove and 474 not upgraded.
1 not fully installed or removed.
Need to get 87.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main apache2 amd64 2.4.7-1ubuntu4.4 [87.4 kB]
Fetched 87.4 kB in 3s (28.0 kB/s)  
(Reading database ... 172062 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.7-1ubuntu4.4_amd64.deb ...
Unpacking apache2 (2.4.7-1ubuntu4.4) over (2.4.7-1ubuntu4.4) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up javascript-common (11) ...
dpkg: error processing package javascript-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up apache2 (2.4.7-1ubuntu4.4) ...
/etc/init.d/apache2: 64: .: Can't open /etc/apache2/envvars
/etc/init.d/apache2: 76: .: Can't open /etc/apache2/envvars
ERROR: APACHE_PID_FILE needs to be defined in /etc/apache2/envvars
invoke-rc.d: initscript apache2, action "restart" failed.
Errors were encountered while processing:
 javascript-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我运行命令时-

sudo apt-get 升级

我遇到了同样的错误,我想我在卸载 apache 2 时删除了一些基本目录。任何人都请帮我恢复文件并安装 apache 2。

【问题讨论】:

    标签: linux apache ubuntu installation


    【解决方案1】:

    最后我通过运行命令解决了错误-

    sudo apt-get clean && sudo apt-get autoclean
    sudo apt-get purge apache2
    sudo apt-get install apache2
    

    【讨论】:

    • 通过上述命令我的 apache2 已安装但 phpmyadmin 仍然无法正常工作。
    【解决方案2】:

    无需重新安装apache2(并使用purge 删除所有配置)。做吧:

    sudo apt-get purge javascript-common 
    sudo apt-get install javascript-common
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-04
      • 2016-01-07
      相关资源
      最近更新 更多