#01 dpkg使用apt安装 Tomcat 7失败

2019-03-28  本文已影响0人  木_19ed

问题:

安装Tomcat7时,出现以下错误:

Setting up tomcat7 (7.0.26-1ubuntu1.1).. . 
chmod: cannot access `/etc/tomcat7/tomcat-users.xml': No such file or directory 
dpkg: error processing tomcat7 (--configure): 
 subprocess installed post-installation script returned error exit status 1 
No apport report written because MaxReports is reached already 
> Errors were encountered while processing: 
 tomcat7 
E: Sub-process/usr/bin/dpkg returned an error code (1)

当我尝试删除Tomcat7时,我得到了这个错误:

Removing tomcat7.. . 
 * tomcat7 is not installed 
invoke-rc.d: initscript tomcat7, action"stop" failed.

如何修复这里问题以便正确安装 Tomcat 7?


回答 1:

我也有同样的问题。

为了查看所有相关的库,我必须运行这个命令( 请参见下面),并删除所有的tomcat相关库:

要查看所有的tomcat相关库,请执行以下操作:

dpkg -l | grep -i tomcat

要删除tomcat库,请执行以下操作:

dpkg -P <library-name>

然后,我使用以下命令重新安装了 tomcat7:

sudo apt-get install tomcat7

[ during installation, it spit out messages saying it is going to install some of the other libraries related to tomcat7 - i chose - yes ]。

它安装了tomcat7并启动了它。

然后,我使用以下命令停止并重新启动 tomcat7:

/etc/init.d/tomcat7 stop
/etc/init.d/tomcat7 start

回答 2:

我有错误说明 tomcat7 is aready newer version 步骤:

使用命令 sudo apt-get autoremove tomcat7 卸载 tomcat7。
这里卸载 tomcat7 完全。
现在使用 sudo apt-get install tomcat7
跟我配合得很好,试试吧。


回答 3:

运行如下命令

sudo apt-get purge libtomcat7-java tomcat6 tomcat6-admin tomcat6-docs tomcat6-examples tomcat7 tomcat7-admin tomcat7-common tomcat7-docs tomcat7-examples tomcat7-user
sudo apt-get install tomcat7

原文地址链接:dpkg使用apt安装 Tomcat 7失败

上一篇下一篇

猜你喜欢

热点阅读