Não é possível localizar pacotes e erros do dpkg

0

Eu estava tentando instalar o netbeans . Agora não consigo instalar nada - recebo vários erros quando tento

Este é um exemplo de erro que recebo:

$ 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

O que devo fazer? coisas novas

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
    
por Riconz 06.12.2017 / 08:58

1 resposta

5

Eu sugiro que você dedique um tempo para aprender mais sobre as diferentes distribuições Linux disponíveis e o que elas usam para executar ou operar. O Ubuntu é um derivado do Debian, portanto, usa os arquivos .deb para instalar aplicativos e programas, enquanto os arquivos .rpm que você vê tentando instalar no Ubuntu são para o RHEL (Redhat Enterprise Linux) e seus derivados como CentOS, Fedora etc.

Seu problema é que você está tentando instalar um arquivo .rpm em um sistema Ubuntu, que é como tentar instalar um arquivo .exe do Windows no Ubuntu. Por favor, procure a versão do Ubuntu desses aplicativos que devem terminar na extensão .deb e instalá-los.

Para instalar o java 9 no Ubuntu para um iniciante, use estas etapas:

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

Para definir como padrão:

sudo apt install oracle-java9-set-default
java -version
    
por George Udosen 06.12.2017 / 09:22