I'm trying to install glut by running the command sudo apt-get install freeglut3-dev
but instead of installing glut apt-get attempts to install Java, which I remember trying to install a few days ago.
Error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
freeglut3-dev is already the newest version (2.8.1-3).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-06-05 22:27:09-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 2.127.246.99, 2.127.246.88
Connecting to download.oracle.com (download.oracle.com)|2.127.246.99|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-06-05 22:27:09-- https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 2a02:26f0:6000:188::2d3e, 2a02:26f0:6000:182::2d3e, 72.246.145.28
Connecting to edelivery.oracle.com (edelivery.oracle.com)|2a02:26f0:6000:188::2d3e|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1496698149_caee32bd2be689be6e287d0dc2327b9b [following]
--2017-06-05 22:27:09-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1496698149_caee32bd2be689be6e287d0dc2327b9b
Connecting to download.oracle.com (download.oracle.com)|2.127.246.99|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-06-05 22:27:11 ERROR 404: Not Found.
download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Update
sudo apt-get autoremove
also fails with the error message
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-06-05 22:40:46-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 90.223.189.171, 90.223.189.136
Connecting to download.oracle.com (download.oracle.com)|90.223.189.171|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-06-05 22:40:46-- https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 2a02:26f0:a1:29d::2d3e, 2a02:26f0:a1:2a0::2d3e, 72.246.145.28
Connecting to edelivery.oracle.com (edelivery.oracle.com)|2a02:26f0:a1:29d::2d3e|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1496698966_f1174438ea33637e096efb0850659a23 [following]
--2017-06-05 22:40:46-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1496698966_f1174438ea33637e096efb0850659a23
Connecting to download.oracle.com (download.oracle.com)|90.223.189.171|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-06-05 22:40:46 ERROR 404: Not Found.
download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
The solution answer.
The clue was
1 not fully installed or removed.
The output you posted is indicating that the package of your question is installed. It's showing you the version that you have installed.
I highlighted the entry of your output. The version you installed is the latest.
You can't install something that you already have installed. You'll get the output that it's already installed.
You mentioned that you tried to install Java at a different time. The other messages you are seeing is the system trying to clean up a failed installed.
It deals with the new package that you attempt to install. It also proceeds to deal with other problems and errors that are in the queue. You can deal with the errors in the queue by canceling what you are suggesting that you are not trying to install, and it's doing on its own.
Review the command you used to attempt the Java install by running this:
Now run this to cancel those fail installations:
After you have purged the failed install you can then run the
sudo apt autoremove
to perform the cleanup.You can also followup with removing the Webup8 installer package with:
You can install Java very easily by running this command:
This will install the latest version of Openjdk for your version of Ubuntu.
Alternatively, you can install Oracle's Jave by carefully executing the install steps, which are:
I used the version 7 because that is what it appears you tried to install. You can use 7,8, or 9 depending on the version you want to install.
If you install more than one java version you can choose which will be activated by running this command:
Important
When manually running the installs it's important to also manually perform update and upgrade commands for the packages that you have installed. The update command updates the repository sites.
The commands are:
Those commands will ensure that you have the latest versions of the dependencies for the packages you'll be installing from the repositories.