-   Linux - Server (
-   -   E:unable to locate package (

hafiznasrullah 09-10-2012 01:42 AM

E:unable to locate package
When i install java package by typing this commands

sudo apt-get install java-package

then following error occurs

E:unable to locate package.

if anyone know please give me a suitable commands or tell me how to resolve this issue

evo2 09-10-2012 01:58 AM


it seems you have just made a guess at what the name of the package is. To search for the actual package you are interested in, you can use apt-cache. For example:

apt-cache search java
Or perhaps replace "java" with "jre" or maybe "jdk" etc.

If none of the above return anything useful please tell us what OS you are using, and what you have in your /etc/apt/sources.list and any files in /etc/apt/sources.list.d/


jsaravana87 09-10-2012 01:59 AM


Try to install sun java ,if u can't find the package add the appropriate repository to install the sun java

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

To check java is installed already you these command

#java -version

hafiznasrullah 09-10-2012 02:18 AM

when we enter following commands
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

then following error occurs

E:package 'sun-java6-jre' has no installation candidate

if i see the java version through

java -version

java verdion "1.6.0_24"

how we update java version and how to install java packges.

jsaravana87 09-10-2012 03:43 AM


Try to update repo

#sudo apt-get install python-software-properties
#sudo add-apt-repository ppa:sun-java-community-team/sun-java6
#sudo apt-get update
#sudo apt-get install sun-java6-jdk

Furthur info look after the link

hafiznasrullah 09-10-2012 04:10 AM

i have an error "line 178 : make-jpkg: command not found" when i enter command

fakeroot make-jpkg jdk-1_5_0_17-linux-i586.bin

tell me which package i have to install for mak-jpkg.

jsaravana87 09-10-2012 05:00 AM

I could not know why you are getting out the following error.If u could not find sun java repo then you can go ahead with openjdk which could be avialable defaultly on synaptic package manager.To get more help you have to post the version of operating system you are using .

sudo apt-get install openjdk-6-jdk

craigevil 09-10-2012 07:42 AM

If you are running Debian Stable java-package is only in Testing and unstable. it is not in the Stable repos.

Use openjdk6

apt-get install openjdk-6-jre icedtea6-plugin

All times are GMT -5. The time now is 09:23 PM.