Is it possible to install tomcat6 in ubuntu 16.04? does ubuntu 16.04 supports tomcat6? when I try to install tomcat 6 using apt-get install i got the following message

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package tomcat6

and when I try to install libtomcat6-java got following message.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libtomcat6-java is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libtomcat6-java' has no installation candidate

help me to install tomcat6 using apt-get Thank You.

  • tomcat6 is considered legacy and is not in the official Ubuntu repositories for 16.04.
    – edwinksl
    Aug 15, 2016 at 15:26

2 Answers 2


You'll have to download the tar file, decompress and move to a directory of your choice. You can choose a mirror here and get a different download link.

My steps:

$ wget http://ftp.unicamp.br/pub/apache/tomcat/tomcat-6/v6.0.53/bin/apache-tomcat-6.0.53.tar.gz
$ tar xvzf apache-tomcat-6.0.47.tar.gz
$ sudo mkdir /usr/local/tomcat
$ sudo mv apache-tomcat-6.0.47 /usr/local/tomcat

I'm almost sure that Tomcat 6 works in Java 6, so additional steps are required if your Ubuntu is using, for instance, Java 8.

As Java 6 is no longer distributed for Ubuntu, you'll need to download a legacy package and install manually, according to this answer.

$ chmod a+x jdk-6u45-linux-x64.bin
$ sudo ./jdk-6u45-linux-x64.bin
$ mv jdk1.6.0_45 java-6-oracle
$ sudo mv java-6-oracle /usr/lib/jvm

And now, you can switch java version using either update-alternatives or galternatives.

Additionally, modify your .bashrc file to set JAVA_HOME variable:

export JAVA_HOME=/usr/lib/jvm/java-6-oracle

For 6 the apt-get command is

sudo apt-get install tomcat6

I don't know if that version is still in the repo for Ubuntu 16.04. Otherwise you have to download the tar bundle and install it from there.

  • Why do you need 6, not 7 or 8?
  • Why are you limited to apt-get?

Manual install is not that difficult if I remember correctly. You should however record precisely what you're doing and copy all config files you edited as backup. When you need to upgrade, you want to know how you did it the first time.

  • 1
    tomcat6 doesn't exist for Ubuntu 16.04.
    – edwinksl
    Aug 15, 2016 at 15:31
  • But won't a tar download work?
    – SPRBRN
    Aug 15, 2016 at 15:32
  • my application is tomcat 6 compatible, and my unix administration skills are limited.
    – Satya N
    Aug 15, 2016 at 15:32
  • @SPRBRN Untarring the tar from tomcat.apache.org/download-60.cgi would work but that's not what your answer is advocating.
    – edwinksl
    Aug 15, 2016 at 15:34
  • You're in an XY situation. Give us info about the app that you want to install. If it's Tomcat 6 compatible, it might just work under 7 of 8. As those are easy to install, have you tried that?
    – SPRBRN
    Aug 15, 2016 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .