0

I was trying to install netbeans. Now I cannot install anything - I get various errors when I try

This is an example of error i get:

$ sudo apt-get install defoult-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package defoult-jre

rico@rico-Aspire-5750G:~$ cd Downloads
rico@rico-Aspire-5750G:~/Downloads$ ls
jdk-9.0.1_linux-x64_bin.rpm  netbeans-8.2-linux.sh  popcorntime

rico@rico-Aspire-5750G:~/Downloads$ chmod 755 jdk-9.0.1_linux-x64_bin.rpm
rico@rico-Aspire-5750G:~/Downloads$ sudo ./jdk-9.0.1_linux-x64_bin.rpm 
./jdk-9.0.1_linux-x64_bin.rpm: 1: ./jdk-9.0.1_linux-x64_bin.rpm: cannot create �,�0�@bf802f8c16be99346ce683a49f8ea6015f466193����al�����l0�vz}�>�������9�x?�h��
                          ���   �   K������
                                                                      ��7�  a�s�{�����<}�����   �N�
���
     ���
�H��L��.�.��E�
FdF�H@(Hu7H|>��?��@��C��G�H�
                                                                     �����X��
�
\�(�
,��*�bԨd�?e�Df�Gl�I��dCjdk-9.0.19.0.1ga�Java Platform Standard Edition Development KitThe Java Platform Standard Edition Development Kit (JDK) includes both
the runtime environment (Java virtual machine, the Java platform classes
and supporting files) and development tools (compilers, debuggers,
tool libraries and other tools).

The JDK is a development environment for building applications, applets
and components that can be deployed with the Java Platform Standard
Edition Runtime Environment.Y�r�sca00llc.us.oracle.comx�Oracle: File name too long
./jdk-9.0.1_linux-x64_bin.rpm: 1: ./jdk-9.0.1_linux-x64_bin.rpm: ����jdk-9.0.1-2000:9.0.1-ga���T: not found
Error: unpack200 - command could not be found.

Please refer to the Troubleshooting section of theInstallation Instructions
on the download page.
./jdk-9.0.1_linux-x64_bin.rpm: 915: [: unexpected operator
./jdk-9.0.1_linux-x64_bin.rpm: 916: [: unexpected operator
/usr/sbin/alternatives not available, skip registering alternatives for java...
./jdk-9.0.1_linux-x64_bin.rpm: 2608: ./jdk-9.0.1_linux-x64_bin.rpm: Syntax error: word unexpected (expecting ")")
rico@rico-Aspire-5750G:~/Downloads$ ls
jdk-9.0.1_linux-x64_bin.rpm  netbeans-8.2-linux.sh  popcorntime
rico@rico-Aspire-5750G:~/Downloads$ sudo apt-get jdk-9.0.1_linuxx64_bin.rpm
E: Invalid operation jdk-9.0.1_linuxx64_bin.rpm
rico@rico-Aspire-5750G:~/Downloads$ sudo apt-get jdk-9.0.1_linux64_bin.rpmE: Invalid operation jdk-9.0.1_linux64_bin.rpm
rico@rico-Aspire-5750G:~/Downloads$ sudo apt-get install jdk-9.0.1_linux64_bin.rpm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package jdk-9.0.1_linux64_bin.rpm

What should I do? new stuff

rico@rico-Aspire-5750G:~$ cd /var/lib/dpkg/info
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's/=177/=179/' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's/SHA256SUM_TGZ="a6905f3a4245a071880e1793b8d3d6100ef7b171ea1d6ebfe6312c25c2fca8bb"/SHA256SUM_TGZ="06fe58dfa50c4f6ca21dc1d475f16cd9e58db36b1d98582091d7ff9005dda7a7"/' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo apt-get install oracle-java9-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java9-installer is already the newest version (9.0.1-1~webupd8~0).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up java-common (0.56ubuntu2) ...
mkdir: cannot create directory ‘/etc/.java/.systemPrefs’: File exists
dpkg: error processing package java-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java9-installer:
 oracle-java9-installer depends on java-common (>= 0.24); however:
  Package java-common is not configured yet.

dpkg: error processing package oracle-java9-installer (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-9-jre-headless:amd64:
 openjdk-9-jre-headless:amd64 depends on java-common (>= 0.28); however:
  Package java-common is not configured yet.

dpkg: error processing package openjdk-9-jre-headless:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ca-certificates-java:
 ca-certificates-java depends on openjdk-7-jre-headless (>= 7~u3-2.1.1~pre1-1) | java7-runtime-headless; however:
  Package openjdk-7-jre-headless is not installed.
  Version of openjdk-7-jre-headless on system, provided by oracle-java9-installer:amd64, is <none>.
  Package java7-runtime-headless is not installed.No apport report written because the error message indicates its a followup error from a previous failure.
                                                                            No apport report written because the error message indicates its a followup error from a previous failure.
                      No apport report written because MaxReports is reached already

  Package oracle-java9-installer which provides java7-runtime-headless is not configured yet.
  Package openjdk-9-jre-headless:amd64 which provides java7-runtime-headless is not configured yet.

dpkg: error processing package ca-certificates-java (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 java-common
 oracle-java9-installer
 openjdk-9-jre-headless:amd64
 ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ oracle-java9-installer.config
oracle-java9-installer.config: command not found
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ cd ..
rico@rico-Aspire-5750G:/var/lib/dpkg$ cd..
cd..: command not found
rico@rico-Aspire-5750G:/var/lib/dpkg$ cd..
cd..: command not found
rico@rico-Aspire-5750G:/var/lib/dpkg$ cd..
cd..: command not found
rico@rico-Aspire-5750G:/var/lib/dpkg$ cd ..
rico@rico-Aspire-5750G:/var/lib$ cd ..
rico@rico-Aspire-5750G:/var$ cd ..
rico@rico-Aspire-5750G:/$ ^V
: command not found
rico@rico-Aspire-5750G:/$ cd /var/lib/dpkg/info
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's|SHA256SUM_TGZ="2ef49c97ddcd5e0de20226eea4cca7b0d7de63ddec80eff8291513f6474ca0dc"|SHA256SUM_TGZ="2cdaf0ff92d0829b510edd883a4ac8322c02f2fc1beae95d048b6716076bc014"|' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's|SHA256SUM_TGZ="1c6d783a54fcc0673ed1f8c5e8650b1d8977ca3e856a03fba0090198e0f16f6d"|SHA256SUM_TGZ="2cdaf0ff92d0829b510edd883a4ac8322c02f2fc1beae95d048b6716076bc014"|' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's|JAVA_VERSION_MAJOR=9|JAVA_VERSION_MAJOR=9.0.1|' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's|JAVA_VERSION_MINOR=181|JAVA_VERSION_MINOR=11|' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's|J_DIR=jdk-9|J_DIR=jdk-9.0.1|' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's|FILENAME=jdk-${JAVA_VERSION_MAJOR}+${JAVA_VERSION_MINOR}_linux-${dld}_bin.tar.gz|FILENAME=jdk-${JAVA_VERSION_MAJOR}_linux-${dld}_bin.tar.gz|' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo sed -i 's|PARTNER_URL=http://download.java.net/java/jdk${JAVA_VERSION_MAJOR}/archive/${JAVA_VERSION_MINOR}/binaries/$FILENAME|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}+${JAVA_VERSION_MINOR}/$FILENAME|' oracle-java9-installer.*
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ sudo apt-get install oracle-java9-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java9-installer is already the newest version (9.0.1-1~webupd8~0).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up java-common (0.56ubuntu2) ...
mkdir: cannot create directory ‘/etc/.java/.systemPrefs’: File exists
dpkg: error processing package java-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java9-installer:
 oracle-java9-installer depends on java-common (>= 0.24); however:
  Package java-common is not configured yet.

dpkg: error processing package oracle-java9-installer (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    dpkg: dependency problems prevent configuration of openjdk-9-jre-headless:amd64:
 openjdk-9-jre-headless:amd64 depends on java-common (>= 0.28); however:
  Package java-common is not configured yet.

dpkg: error processing package openjdk-9-jre-headless:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ca-certificates-java:
 ca-certificates-java depends on openjdk-7-jre-headless (>= 7~u3-2.1.1~pre1-1) | java7-runtime-headless; however:
  Package openjdk-7-jre-headless is not installed.
  Version of openjdk-7-jre-headless on system, provided by oracle-java9-installer:amd64, is <none>.
  Package java7-runtime-headless is not installed.
  Package oracle-java9-installer which provides java7-runtime-headless is not configured yet.
  Package openjdk-9-jre-headless:amd64 which provides java7-runtime-headless is not configured yet.

dpkg: error processing package ca-certificates-java (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 java-common
 oracle-java9-installer
 openjdk-9-jre-headless:amd64
 ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ 


---

  Errors were encountered while processing:
 java-common
 oracle-java9-installer
 openjdk-9-jre-headless:amd64
 ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)
rico@rico-Aspire-5750G:/var/lib/dpkg/info$ 
 plof plof
jokerdino
  • 41,320
Riconz
  • 11

1 Answers1

5

I suggest you take the time to learn more about the different Linux distributions available and what they use to run or operate. Ubuntu is a Debian derivative hence uses the .deb files to install applications and programs, while the .rpm files I see you trying to install on Ubuntu is meant for RHEL (Redhat Enterprise Linux) and its derivatives like CentOS, Fedora etc.

Your problem is your trying to install a .rpm file on an Ubuntu system which is like trying to install a Windows .exe file on Ubuntu. Please kindly look for the Ubuntu version of those applications which should end in the extension .deb and install those.

To install java 9 on Ubuntu for a beginner use these steps:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt install oracle-java9-installer

To set it as the default:

sudo apt install oracle-java9-set-default
java -version
George Udosen
  • 36,677
  • Errors were encountered while processing: java-common oracle-java9-installer E: Sub-process /usr/bin/dpkg returned an error code (1) rico@rico-Aspire-5750G:~$ I did this before even not rpm and gives me a different error so I tried different ways but I did not know that the rpm not works on ubuntu ...so now with this error up there where I should go?for fixing it...anyway thanks guys for the answeres... – Riconz Dec 06 '17 at 10:01
  • dpkg: error processing package ca-certificates-java (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: java-common oracle-java9-installer openjdk-9-jre-headless:amd64 ca-certificates-java rico@rico-Aspire-5750G:~$ – Riconz Dec 06 '17 at 10:18
  • same thing ,dpkg: error processing package ca-certificates-java (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: java-common oracle-java9-installer openjdk-9-jre-headless:amd64 ca-certificates-java E: Sub-process /usr/bin/dpkg returned an error code (1) rico@rico-Aspire-5750G:~$ – Riconz Dec 06 '17 at 10:27
  • Ok look at this fix: https://askubuntu.com/questions/938314/cant-install-oracle-jdk-9 – George Udosen Dec 06 '17 at 10:28
  • I tried but same thing...this problem is makeing me crazy , Errors were encountered while processing: java-common oracle-java9-installer openjdk-9-jre-headless:amd64 ca-certificates-java E: Sub-process /usr/bin/dpkg returned an error code (1) – Riconz Dec 06 '17 at 10:46
  • 1
    @Riconz I suggest you open a new question with your problem you have now. Because this answer already answered what your original question here was about. – derHugo Dec 06 '17 at 10:48
  • is not answered I tried even to install the 8 that is more stable but nothing changes Errors were encountered while processing: java-common oracle-java8-installer E: Sub-process /usr/bin/dpkg returned an error code (1) – Riconz Dec 06 '17 at 11:09
  • @Riconz your question was about the error so I have pointed out that was caused by using the wrong installation file, so for the error your getting that is another question as stated by derHugo – George Udosen Dec 06 '17 at 11:36
  • ok I am continueing here :E: Sub-process /usr/bin/dpkg returned an error code (1) installing jdk and NetBeans – Riconz Dec 06 '17 at 11:44