Tomcat8(8.0.32-1ubuntu1.5)安装失败求助
Hey there, let's break down what's happening here and walk through how to fix it:
Why the version disappeared
It’s almost certain that the specific tomcat8 version 8.0.32-1ubuntu1.5 has been removed from your configured Ubuntu software repositories. Ubuntu regularly prunes older package versions from its main archives, especially for releases that have reached End-of-Life (EOL). This version is tied to Ubuntu 16.04 (Xenial Xerus)—a release that’s no longer supported—so its original package sources have been moved to Ubuntu’s old releases archive, and your system’s apt sources are probably still pointing to the retired main archive.
How to resolve this
Option 1: Check available versions in your current sources
First, confirm which tomcat8 versions are still accessible to your system:
apt list -a tomcat8
Or:
apt-cache showpkg tomcat8
This will list all versions that apt can find right now. If your system can reach valid sources, you might see a newer compatible version you can use instead.
Option 2: Install the latest available version (if you can compromise)
If you don’t strictly need the exact 8.0.32-1ubuntu1.5 version, install the newest supported version from your sources:
DEBIAN_FRONTEND=noninteractive apt-get install -y tomcat8
Option 3: Retrieve the exact old version (if you must have it)
Sub-option 3a: Switch to Ubuntu's old releases archive
If your system is an EOL Ubuntu version (like 16.04), update your apt sources to point to the old releases repository:
- Edit your sources list file:
nano /etc/apt/sources.list - Replace all instances of
http://archive.ubuntu.com/ubuntu/withhttp://old-releases.ubuntu.com/ubuntu/ - Save the file and run:
apt-get update - Now try installing your target version again:
DEBIAN_FRONTEND=noninteractive apt-get install -y tomcat8=8.0.32-1ubuntu1.5
Sub-option 3b: Manually download and install the .deb package
If switching sources isn’t an option, you can directly fetch the specific .deb file:
- Locate the
tomcat8_8.0.32-1ubuntu1.5_all.debpackage from Ubuntu’s old package archives. - Download it to your system (use
wgetor a browser). - Install it with dpkg, making sure to resolve any missing dependencies:
dpkg -i tomcat8_8.0.32-1ubuntu1.5_all.deb # Fix missing dependencies if needed apt-get install -f
Sub-option 3c: Check local apt cache
If you previously installed this version on the same system, the .deb file might still be in your local apt cache:
ls /var/cache/apt/archives/tomcat8_8.0.32-1ubuntu1.5_all.deb
If it exists, install it with dpkg -i as outlined above.
内容的提问来源于stack exchange,提问作者adbo

