无法在 Ubunu 12.04 上安装 Tomcat 7

无法在 Ubunu 12.04 上安装 Tomcat 7

我正在尝试在运行 Wubi 12.04(不是服务器)的 Dell Dimention 3000 上安装 Tomcat 7。我在这里找到了说明: http://www.liquidweb.com/kb/how-to-install-apache-tomcat-7-on-ubuntu-12-04/,但无法通过步骤 1A。当它尝试安装某些软件包时,我收到 404 错误。

这是我用来安装的代码:sudo apt-get install tomcat7

这是我的终端窗口的日志:

Script started on Wed 04 May 2016 07:23:33 PM CDT
]0;username@ubuntu: ~username@ubuntu:~$ sudo apt-get install tomcat7
[sudo] password for username: 

Reading package lists... 0%

Reading package lists... 100%

Reading package lists... Done


Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 1%

Building dependency tree... 2%

Building dependency tree... 3%

Building dependency tree... 4%

Building dependency tree... 5%

Building dependency tree... 7%

Building dependency tree... 14%

Building dependency tree... 32%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree... 51%

Building dependency tree... 52%

Building dependency tree... 53%

Building dependency tree... 54%

Building dependency tree... 55%

Building dependency tree... 56%

Building dependency tree... 57%

Building dependency tree... 58%

Building dependency tree... 59%

Building dependency tree... 60%

Building dependency tree... 61%

Building dependency tree... 62%

Building dependency tree... 63%

Building dependency tree... 64%

Building dependency tree... 66%

Building dependency tree... 68%

Building dependency tree... 69%

Building dependency tree... 71%

Building dependency tree... 74%

Building dependency tree... 77%

Building dependency tree... 87%

Building dependency tree       


Reading state information... 0%

Reading state information... 0%

Reading state information... 2%

Reading state information... Done

The following extra packages will be installed:
  authbind ca-certificates-java default-jre-headless icedtea-6-jre-cacao
  icedtea-6-jre-jamvm java-common libcommons-collections3-java
  libcommons-dbcp-java libcommons-pool-java libecj-java libnss3 libnss3-1d
  libservlet3.0-java libtomcat7-java openjdk-6-jre-headless openjdk-6-jre-lib
  tomcat7-common tzdata tzdata-java
Suggested packages:
  default-jre equivs libcommons-collections3-java-doc
  libgeronimo-jta-1.0.1b-spec-java ecj ant libecj-java-gcj sun-java6-fonts
  ttf-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho ttf-telugu-fonts
  ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts tomcat7-docs
  tomcat7-admin tomcat7-examples tomcat7-user libtcnative-1
The following NEW packages will be installed:
  authbind ca-certificates-java default-jre-headless icedtea-6-jre-cacao
  icedtea-6-jre-jamvm java-common libcommons-collections3-java
  libcommons-dbcp-java libcommons-pool-java libecj-java libnss3-1d
  libservlet3.0-java libtomcat7-java openjdk-6-jre-headless openjdk-6-jre-lib
  tomcat7 tomcat7-common tzdata-java
The following packages will be upgraded:
  libnss3 tzdata
2 upgraded, 18 newly installed, 0 to remove and 237 not upgraded.
Need to get 44.5 MB/50.4 MB of archives.
After this operation, 71.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y


0% [Working]

0% [Connecting to security.ubuntu.com (91.189.91.26)]

Get:1 http://security.ubuntu.com/ubuntu/ precise-security/main libnss3 i386 2:3.21-0ubuntu0.12.04.3 [1,244 kB]


0% [1 libnss3 0 B/1,244 kB 0%]

3% [Working]

Get:2 http://security.ubuntu.com/ubuntu/ precise-security/main openjdk-6-jre-lib all 6b38-1.13.10-0ubuntu0.12.04.1 [6,258 kB]


3% [2 openjdk-6-jre-lib 0 B/6,258 kB 0%]

10% [2 openjdk-6-jre-lib 3,420 kB/6,258 kB 55%]

17% [Working]

Get:3 http://security.ubuntu.com/ubuntu/ precise-security/main libnss3-1d i386 2:3.21-0ubuntu0.12.04.3 [13.4 kB]


17% [3 libnss3-1d 0 B/13.4 kB 0%]

17% [Working]

Err http://security.ubuntu.com/ubuntu/ precise-security/main tzdata all 2016c-0ubuntu0.12.04
  404  Not Found [IP: 91.189.91.26 80]


17% [Working]                                               29.1 kB/s           21min 11s

Get:4 http://security.ubuntu.com/ubuntu/ precise-security/main openjdk-6-jre-headless i386 6b38-1.13.10-0ubuntu0.12.04.1 [35.1 MB]


Get:5 http://security.ubuntu.com/ubuntu/ precise-security/main icedtea-6-jre-cacao i386 6b38-1.13.10-0ubuntu0.12.04.1 [771 kB]


Get:6 http://security.ubuntu.com/ubuntu/ precise-security/main icedtea-6-jre-jamvm i386 6b38-1.13.10-0ubuntu0.12.04.1 [553 kB]

99% [Working]                                                     29.1     kB/s 19s

Err http://archive.ubuntu.com/ubuntu/ precise-updates/main tzdata all 2016c-0ubuntu0.12.04
  404  Not Found [IP: 91.189.91.26 80]

99% [Working]                                                     29.1 kB/s 19s

Err http://archive.ubuntu.com/ubuntu/ precise-updates/main tzdata-java all 2016c-0ubuntu0.12.04
  404  Not Found [IP: 91.189.91.26 80]

99% [Working]                                                     29.1 kB/s 19s

Fetched 43.9 MB in 4min 19s (169 kB/s)
Failed to fetch     http://archive.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata_2016c-    0ubuntu0.12.04_all.deb  404  Not Found [IP: 91.189.91.26 80]
Failed to fetch     http://archive.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata-java_2016c-0ubuntu0.12.04_all.deb  404  Not Found [IP: 91.189.91.26 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
]0;username@ubuntu: ~username@ubuntu:~$ exit\\\[K[K[K[K[K[K[Kexit
exit

Script done on Wed 04 May 2016 07:38:30 PM CDT

答案1

请尝试运行

sudo apt-get update

更新您的软件包列表。它是否给出任何错误?

如果没有,则尝试运行

sudo apt-get install tomcat7

再次。这应该可以解决您的问题。

相关内容