2011-03-17 77 views
7

我创建的Ubuntu 10.04 EC2镜像,现在我需要安装Tomcat apache和JDK6在我的实例,但每当我用命令sudo apt-get install sun-java6-jdksudo apt-get install tomcat6 adminsudo apt-get install ec2-api-tools亚马逊Web服务和Ubuntu 10.04 EC2实例

Package ec2-api-tools is not available, but is referred to by another package. 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
Package ec2-api-tools 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 ec2-api-tools has no installation candidate 

回答

8

另一种选择是他们的official repository添加到容易 - 这将为您提供最新的AWS工具:

sudo apt-add-repository ppa:awstools-dev/awstools 
sudo apt-get update 
sudo apt-get install ec2-api-tools -y 

这是更远的版本非常有用的,并为最新的官方漏洞修复等刚通过运行通常的

sudo apt-get update 
sudo apt-get upgrade -y 
+0

它有帮助!谢谢! – Eric 2013-01-15 02:18:24

2

的Ubuntu没有默认提供了Sun的JDK所以/etc/apt/sources.list中取消注释:

deb http://archive.canonical.com/ubuntu maverick partner 
deb-src http://archive.canonical.com/ubuntu maverick partner 

然后:

sudo apt-get update 
sudo apt-get install sun-java6-jdk 

ec2-api-tools要求source.list中的多重线条先被取消注释(还记得apt-get update)。

+0

请确保你没有指向'强壮'的多重宇宙线。我仍然收到错误消息“Package ec2-api-tools has no installation candidate”,直到我用'lucid'替换'hardy'。 – 2011-04-11 21:59:34

1

我有点困惑,如果你只是想安装Java和Tomcat,你为什么还要安装ec2工具?

在任何情况下,我也想提及免费BitNami Cloud Tools installer(免责声明:我是开发人员之一)。它包括JDK和所有与EC2相关的工具。我们保持最新状态,并且可以以普通用户身份运行。