2011-03-17 88 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相關的工具。我們保持最新狀態,並且可以以普通用戶身份運行。