Results 1 to 7 of 7

Thread: Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installation c

  1. #1
    Join Date
    Mar 2023
    Beans
    1

    Exclamation Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installation c

    Hi everyone,
    I'm trying to install Tomcat 9 on my Ubuntu system using sudo apt-get install tomcat9, but I keep running into the following error:
    monirul@nitacl-Veriton-Series:~$ sudo apt-get install tomcat9
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Package tomcat9 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 'tomcat9' has no installation candidate

    Here's what I've tried so far:

    • sudo apt update
    • Searching for alternative package names (e.g., tomcat9.0, tomcat-9) using apt-cache search tomcat

    System Information:

    • Ubuntu version: 24.04 LTS
    • Architecture: LAMP (Linux, Apache, MariaDB and Perl, PHP)

    Could anyone please point me in the right direction? Is there a specific repository I need to enable or a different approach to installing Tomcat 9?
    Thanks in advance for your help!

  2. #2
    Join Date
    Dec 2009
    Beans
    6,809

    Re: Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installatio

    Is tomcat10 not backward compatible to tomcat9 because that is the only one in the repository.

  3. #3
    Join Date
    Jun 2024
    Beans
    2

    Re: Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installatio

    Quote Originally Posted by Morbius1 View Post
    Is tomcat10 not backward compatible to tomcat9 because that is the only one in the repository.
    Unfortunately Tomcat 10 is NOT backward compatible to Tomcat 9, and most web apps working on Tomcat 9 will not work on Tomcat 10. Therefore, Tomcat 9 is still supported by Apache and new versions of Tomcat 9 are regularly released.

    There is still an option to manually install Tomcat 9, but absence of Tomcat 9 package in the apt repository of Ubuntu 24.04 is an annoying problem for Tomcat 9 users.

    I wonder if there's somewhere an option to suggest packages to be added to Ubuntu 24.04?

  4. #4
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,693
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installatio

    Sounds like you will need to manually install the application.

    I found this tutorial for Installing Tomcat 9 on Debian 10 which should be very similar to the steps necessary on Ubuntu...with the exception of the step to install curl which is already installed on Ubuntu.

    Keep in mind that Tomcat 9 will NOT receive updates automatically because it was not installed using apt. You will need to re-download the latest package again, stop the Tomcat service and install/overwrite the current installation. However, once you have it installed, much of the initial setup steps do not need to be repeated such as creating a user, configuring systemd and firewall rules.

    But make sure you have a backup of any configuration files you modified that came with the package because extracting another package would overwrite all the files it came with....which is why you typically create files that will be included by the main config to avoid this situation (this is general info...I am not familiar with exact specifics of Tomcat)

    If I were you, I'd document exactly how you install Tomcat on the server (preferably with a slightly older build version) and then document exactly how you should update the system with a new version. There won't be much to the documents kinda like the one I linked above but it will be critical to ensure that you or someone else will know how to update the system with security patches/fixes over time.

    LHammonds

  5. #5
    Join Date
    Jun 2024
    Beans
    2

    Re: Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installatio

    I was able to resolve this by running this command (add the Ubuntu 22.04 repository):


    Code:
    add-apt-repository -y -s "deb http://archive.ubuntu.com/ubuntu/ jammy main universe"
    After that, I was able to install Tomcat 9 on Ubuntu 24.04 via apt.

    Not sure if there could be any bad consequences after adding a legacy repository, though.

  6. #6
    Join Date
    Jun 2024
    Beans
    6

    Re: Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installatio

    Sorry wrong post... I don't know how to delete...
    Last edited by eraknix; June 23rd, 2024 at 10:47 PM.

  7. #7
    Join Date
    Oct 2024
    Beans
    1

    Re: Ubuntu 24.04 | Unable to install Tomcat 9 - "Package 'tomcat9' has no installatio

    Thanks a lot! It helped in solving my problem.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •