Não é possível localizar o pacote default-jdk no Ubuntu 16.04 [duplicate]

0

Na verdade, eu estava tentando instalar o Java (para o Hadoop) no Ubuntu 16.04. Mas sempre que eu tento executar o sudo apt-get update eu sempre recebo o erro de:

E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_main_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_main_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_main_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_main_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_restricted_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_restricted_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_restricted_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_restricted_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_universe_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_universe_i18n_Translation-en (1)

E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_multiverse_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_multiverse_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_multiverse_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial_multiverse_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_universe_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_universe_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_universe_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_universe_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_multiverse_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_multiverse_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_multiverse_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-updates_multiverse_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_restricted_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_restricted_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_restricted_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_restricted_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_universe_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_universe_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_universe_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_universe_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_multiverse_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_multiverse_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_multiverse_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_xenial-backports_multiverse_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_main_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_main_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_main_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_main_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_restricted_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_universe_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_universe_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_universe_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_universe_i18n_Translation-en (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_multiverse_binary-amd64_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_multiverse_binary-i386_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_multiverse_binary-all_Packages (1)
E: Unable to parse package file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_multiverse_i18n_Translation-en (1)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corrupted

e depois disso sempre que eu executo o comando:

sudo apt-get install default-jdk

sempre recebo um erro de:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package default-jdk
    
por TheHumbleGhost 13.09.2017 / 19:25

1 resposta

1

Deve haver algumas linhas antes de E: Unable to parse package file mostrar erros como este:

E: Unable to parse package file /var/lib/apt/lists/…

Você precisa

sudo rm -i /var/lib/apt/lists/*
sudo apt update

Não não esqueça o asterisco * no primeiro comando!

    
por Kaveh Vahedipour 13.09.2017 / 21:22