在 Ubuntu 上安装 Jetty 的最佳方法是什么?

在 Ubuntu 上安装 Jetty 的最佳方法是什么?

这里有谁在 ubuntu 上下载并安装了 Jetty 吗?请帮忙。你是怎么安装的?我试了两天,还是无法安装。最后我重新安装了 ubuntu,但仍然无法下载和安装 jetty。我试过这些教程,但都不起作用:

我正在运行 ubuntu 13.10。


编辑4

a@a:~$ sudo apt-get install jetty libjetty8-extra-java libjetty8-java libjetty-extra-java libjetty-extra libjetty-java-doc jetty8 libjetty8-java-doc libjetty-java jsvc default-jre-headless apache2-utils adduser
Reading package lists... Done
Building dependency tree       
Reading state information... Done
adduser is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libjetty8-extra-java : Depends: libtomcat7-java (>= 7.0.28) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

编辑3

a@a:~$ sudo apt-get install jetty openjdk-7-jre-headless libjetty8-extra-java libjetty8-java libjetty-extra-java libjetty-extra libjetty-java-doc jetty8 libjetty8-java-doc libjetty-java jsvc java5-runtime-headless apache2-utils adduser
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package java5-runtime-headless is a virtual package provided by:
  openjdk-6-jre-headless 6b27-1.12.6-1ubuntu2.1
  gcj-4.8-jre-headless 4.8.1-10ubuntu9
  gcj-4.6-jre-headless 4.6.4-1ubuntu1
  openjdk-7-jre-headless 7u25-2.3.12-4ubuntu3
  gcj-jre-headless 4:4.8.1-2ubuntu3
  default-jre-headless 1:1.7-48ubuntu2
You should explicitly select one to install.

E: Package 'java5-runtime-headless' has no installation candidate
a@a:~$ 

编辑2

a@a:~$ sudo apt-get install jetty libjetty8-extra-java libjetty8-java libjetty-extra-java libjetty-extra libjetty-java-doc jetty8 libjetty8-java-doc libjetty-java jsvc java5-runtime-headless apache2-utils adduser
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package java5-runtime-headless is a virtual package provided by:
  openjdk-6-jre-headless 6b27-1.12.6-1ubuntu2.1
  gcj-4.8-jre-headless 4.8.1-10ubuntu9
  gcj-4.6-jre-headless 4.6.4-1ubuntu1
  openjdk-7-jre-headless 7u25-2.3.12-4ubuntu3
  gcj-jre-headless 4:4.8.1-2ubuntu3
  default-jre-headless 1:1.7-48ubuntu2
You should explicitly select one to install.

E: Package 'java5-runtime-headless' has no installation candidate
a@a:~$ 

编辑1

我试过杜明杜·马哈维拉的答案,但这是我得到的:

a@a:~$ sudo apt-get install jetty libjetty8-extra-java libjetty8-java libjetty-extra-java libjetty-extra libjetty-java-doc jetty8 libjetty8-java-doc libjetty-java jsvc default-jre-headless apache2-utils adduser
[sudo] password for a: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
adduser is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libjetty8-extra-java : Depends: libtomcat7-java (>= 7.0.28) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

答案1

尝试安装关注

sudo apt-get install jetty libjetty8-extra-java libjetty8-java libjetty-extra-java libjetty-extra libjetty-java-doc jetty8 libjetty8-java-doc libjetty-java jsvc default-jre-headless apache2-utils adduser

相关内容