3

i am tring to install tomcat7 on ubuntu 14.04 using the

$sudo apt-get install tomcat7 but it gives an error as

The following NEW packages will be installed:
  tomcat7
0 upgraded, 1 newly installed, 0 to remove and 555 not upgraded.
Need to get 0 B/35.6 kB of archives.
After this operation, 374 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package tomcat7.
(Reading database ... 221751 files and directories currently installed.)
Preparing to unpack .../tomcat7_7.0.52-1ubuntu0.3_all.deb ...
Unpacking tomcat7 (7.0.52-1ubuntu0.3) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up tomcat7 (7.0.52-1ubuntu0.3) ...
chmod: cannot access ‘/etc/tomcat7/tomcat-users.xml’: No such file or directory
dpkg: error processing package tomcat7 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 tomcat7
E: Sub-process /usr/bin/dpkg returned an error code (1)

please correct me if i am doing something wrong ?

  • Whereas this question has been closed, it looks as if you may find an answer there. – Jos Jan 22 '16 at 11:02
  • There is no test in the tomcat7 post-installation script for Trusty to check for an existing /etc/tomcat7/tomcat-users.xml before the chmod command is running. [Edit] your question and add the output of sudo touch /etc/tomcat7/tomcat-users.xml – A.B. Jan 22 '16 at 11:04

1 Answers1

2

Remove this file: /etc/tomcat7/tomcat-users.xml, restart the system and run the commands below

 sudo apt-get update 

then

 sudo apt-get install tomcat7 
 sudo service tomcat7 restart
dadexix86
  • 6,616