Ubuntu 10.04 lts installation sun-java6-jdk, error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk 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 sun-java6-jdk (has no installation candidate)
Said Ubuntu 10.04 has removed the sun-java6-jdk and sun-java6-jre Software Package
Sudo add-Apt-repository "Deb http://archive.canonical.com/lucid partner"
Sudo apt-Get update
Sudo apt-Get install sun-java6-jdk
The error message is the same:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk 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 sun-java6-jdk (has no installation candidate)
All of these have been done. The source list is also checked .. There is also a http://archive.canonical.com/lucid partner and there are several.
Solving ....
Answer by yourself:
The following prompt appears when updating the apt source sudo apt-Get update:
IGN http://extras.ubuntu.com oneiric/main Translation-en_US
IGN http://archive.canonical.com lucid/partner Translation-en_US.
IGN http://archive.canonical.com lucid/partner translation-en
IGN http://extras.ubuntu.com oneiric/main translation-en
IGN http://us.archive.ubuntu.com jaunty/multiverse translationindex
IGN http://us.archive.ubuntu.com jaunty-updates/multiverse translationindex
IGN http://archive.canonical.com natty/partner Co., Translation-en_US.
IGN http://archive.canonical.com natty/partner translation-en
Hit http://us.archive.ubuntu.com oneiric/main translation-en
Hit http://us.archive.ubuntu.com oneiric/multiverse translation-en
Hit http://us.archive.ubuntu.com oneiric/restricted translation-en
Hit http://us.archive.ubuntu.com oneiric/Universe translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/main translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/multiverse translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/restricted translation-en
Hit http://us.archive.ubuntu.com oneiric-updates/Universe translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/main translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/multiverse translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/restricted translation-en
Hit http://us.archive.ubuntu.com oneiric-backports/Universe translation-en
The err http://us.archive.ubuntu.com jaunty/multiverse sources
404 Not found [IP: 91.189.92.180 80]
Err http://us.archive.ubuntu.com jaunty/multiverse amd64 packages
404 Not found [IP: 91.189.92.180 80]
The err http://us.archive.ubuntu.com jaunty/multiverse i386 packages
404 Not found [IP: 91.189.92.180 80]
The err http://us.archive.ubuntu.com jaunty-updates/multiverse sources
404 Not found [IP: 91.189.92.180 80]
Err http://us.archive.ubuntu.com jaunty-updates/multiverse amd64 packages
404 Not found [IP: 91.189.92.180 80]
The err http://us.archive.ubuntu.com jaunty-updates/multiverse i386 packages
404 Not found [IP: 91.189.92.180 80]
IGN http://us.archive.ubuntu.com jaunty/multiverse Translation-en_US
IGN http://us.archive.ubuntu.com jaunty/multiverse translation-en
IGN http://us.archive.ubuntu.com jaunty-updates/multiverse Translation-en_US
IGN http://us.archive.ubuntu.com jaunty-updates/multiverse translation-en
W: failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/multiverse/source/Sources 404 Not found [IP: 91.189.92.180 80]
W: failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/multiverse/binary-amd64/Packages 404 Not found [IP: 91.189.92.180 80]
W: failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty/multiverse/binary-i386/Packages 404 Not found [IP: 91.189.92.180 80]
W: failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/multiverse/source/Sources 404 Not found [IP: 91.189.92.180 80]
W: failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/multiverse/binary-amd64/Packages 404 Not found [IP: 91.189.92.180 80]
W: failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/jaunty-updates/multiverse/binary-i386/Packages 404 Not found [IP: 91.189.92.180 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
But...
CC @ Ubuntu :~ $ Sudo apt-Get install sun-java6-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk 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 'Sun-java6-jdk 'has no installation candidate
???
Then, let's learn what the download is ··
JDK
JDK is the core of the entire Java, including the Java Runtime Environment (Java runtime envirnment), a bunch of Java tools and the Basic Java class library (RT. Jar ). No matter what Java application server is actually built into a certain version of JDK. the most popular JDK is the JDK released by Sun. In addition to sun, many companies and organizations have developed their own JDK, such as JDK developed by IBM and jrocket of Bea, and JDK developed by GNU. Among them, the JVM (Java Virtual Machine) Running Efficiency of ibm jdk is much higher than that of Sun JDK. The jrocket running on the X86 platform is more efficient on the server than sun.
JDK is much better. However, we still need to Master Sun JDK first.
JDK generally has three versions: Se (j2se), Standard Edition, and standard edition. It is a common version of EE (J2EE), enterpsise Edtion, and Enterprise Edition, this JDK is used to develop J2EE applications, such as me (J2EE) and micro Edtion. It is mainly used for Java development tools (JDK) for Java applications on mobile devices and embedded devices) it is the development environment that many Java experts initially use. Although many programmers have used third-party development tools, JDK is still an important tool for Java development. JDK consists of a standard library and a set of Java utilities that are created, tested, and documented. Its core Java
APIs are predefined class libraries that developers need to use to access Java functions. Java APIs include some important language structures and basic graphics, networks and files I/O. generally, the non-I/O part of Java APIs is the same for all platforms running Java, while the I/O part is only implemented in the general Java environment.
As a JDK utility, there are seven main tools in the tool library.
◆ Javac: Java compiler, which converts Java source code into bytecode.
◆ Java: Java interpreter, which executes Java application Byte Code directly from class files.
◆ Appletviewer: applet browser, a Java browser that executes Java applets on HTML files.
◆ Javadoc: Generate HTML documents based on Java source code and instructions.
◆ Jdb: Java debugger, which can execute programs one by one, set breakpoints and check variables.
◆ Javah: generate the C process that can call the Java Process, or create the header file of the C process that can be called by the Java program.
◆ Javap: Java anti-assembler that displays the accessible functions and data in the compilation class file and the meaning of the byte code.
JRE
JRE (Java Runtime Environment, Java Runtime Environment), a set of environments required to run Java programs, including JVM standard implementation and Java core class libraries. Is Sun's product, which includes javaruntimeenvironment and javaplug-injavaruntimeenvironment (JRE). It is a Java platform that can run, test, and transmit applications on it. It includes Java virtual machine, Java platform core class, and support files. It does not contain development tools-compilers, debuggers, and other tools. JRE needs auxiliary software -- javaplug-in -- to run the applet in the browser. j2re is Java2
Runtime environment is the Java Runtime Environment, sometimes referred to as JRE. If you only need to run a Java program or applet, download and install it. If you want to develop Java software on your own, download JDK. JRE is included in JDK. note: because Microsoft does not fully support Java, do not use the virtual machine that comes with IE to run the applet. Be sure to install a JRE or JDK.
Final Implementation Method
1. Add the source:
Deb http://us.archive.ubuntu.com/ubuntu/ hard multiverse.
Method:
Sudo gedit/etc/APT/sources. List
Open source list, add
Deb http://us.archive.ubuntu.com/ubuntu/ hard multiverse. Save and exit.
2. sudo apt-Get update
3. sudo apt-Get install sun-java6-jdk
When:
The following new packages will be installed:
Gsfonts-x11 Java-common odbcinst odbcinst1debian1 sun-java6-bin
Sun-java6-jdk sun-java6-jre unixodbc
0 upgraded, 8 newly installed, 0 to remove and 460 not upgraded.
Need to get 43.6 MB of archives.
After this operation, 131 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Congratulations, you can install it,
Then the download and installation sun-java6-jdk appears... For a long time, when the download is complete
It indicates the operation is successful. Pai_^
Http://blog.csdn.net/yangxingbo0311/article/details/7312030