내가 들어가면
java -version
알겠어요
Command 'java' not found, but can be installed with:
sudo apt install default-jre
sudo apt install openjdk-11-jre-headless
sudo apt install openjdk-8-jre-headless (You will have to enable component called 'universe')
내가 시도할 때
sudo apt install default-jre
알겠어요
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package default-jre 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 'default-jre' has no installation candidate
apt-get update를 시도하고 다른 것도 설치했지만 openjdk를 시도하면 패키지를 찾을 수 없다고 나옵니다...
편집하다:
apt policy
산출:
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic/main i386 Packages
release v=18.04,o=LP-PPA-mosquitto-dev-mosquitto-ppa,a=bionic,n=bionic,l=mosquitto,c=main,b=i386
origin ppa.launchpad.net
500 http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic/main amd64 Packages
release v=18.04,o=LP-PPA-mosquitto-dev-mosquitto-ppa,a=bionic,n=bionic,l=mosquitto,c=main,b=amd64
origin ppa.launchpad.net
500 https://download.mono-project.com/repo/ubuntu stable-bionic/main i386 Packages
release v=18.04,o=XamarinBionic,a=stable-bionic,n=bionic,l=Xamarin-Stable-Bionic,c=main,b=i386
origin download.mono-project.com
500 https://download.mono-project.com/repo/ubuntu stable-bionic/main amd64 Packages
release v=18.04,o=XamarinBionic,a=stable-bionic,n=bionic,l=Xamarin-Stable-Bionic,c=main,b=amd64
origin download.mono-project.com
Pinned packages:
head -n -0 /etc/apt/sources.list /etc/apt/sources.list.d/*
산출:
==> /etc/apt/sources.list <==
# deb cdrom:[Ubuntu 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
# deb-src http://ca.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://ca.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb-src http://ca.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://ca.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb-src http://ca.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://ca.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://ca.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
==> /etc/apt/sources.list.d/google-chrome.list <==
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
==> /etc/apt/sources.list.d/google-chrome.list.distUpgrade <==
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
==> /etc/apt/sources.list.d/google-chrome.list.save <==
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
==> /etc/apt/sources.list.d/google.list <==
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # disabled on upgrade to bionic
==> /etc/apt/sources.list.d/google.list.distUpgrade <==
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
==> /etc/apt/sources.list.d/google.list.save <==
# deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # disabled on upgrade to bionic
==> /etc/apt/sources.list.d/mono-official-preview.list <==
# deb https://download.mono-project.com/repo/ubuntu preview-xenial main
==> /etc/apt/sources.list.d/mono-official-preview.list.distUpgrade <==
# deb https://download.mono-project.com/repo/ubuntu preview-xenial main
==> /etc/apt/sources.list.d/mono-official-preview.list.save <==
# deb https://download.mono-project.com/repo/ubuntu preview-xenial main
==> /etc/apt/sources.list.d/mono-official-stable.list <==
deb https://download.mono-project.com/repo/ubuntu stable-bionic main
==> /etc/apt/sources.list.d/mono-official-stable.list.save <==
deb https://download.mono-project.com/repo/ubuntu stable-bionic main
==> /etc/apt/sources.list.d/mono-xamarin.list <==
# deb http://download.mono-project.com/repo/debian wheezy main
==> /etc/apt/sources.list.d/mono-xamarin.list.distUpgrade <==
# deb http://download.mono-project.com/repo/debian wheezy main
==> /etc/apt/sources.list.d/mono-xamarin.list.save <==
# deb http://download.mono-project.com/repo/debian wheezy main
==> /etc/apt/sources.list.d/mosquitto-dev-ubuntu-mosquitto-ppa-bionic.list <==
deb http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
# deb-src http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
# deb-src http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
# deb-src http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
==> /etc/apt/sources.list.d/mosquitto-dev-ubuntu-mosquitto-ppa-bionic.list.save <==
deb http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
# deb-src http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
# deb-src http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
# deb-src http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu bionic main
==> /etc/apt/sources.list.d/notepadqq-team-ubuntu-notepadqq-xenial.list <==
# deb http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial main
# deb-src http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial main
==> /etc/apt/sources.list.d/notepadqq-team-ubuntu-notepadqq-xenial.list.distUpgrade <==
# deb http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial main
# deb-src http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial main
==> /etc/apt/sources.list.d/notepadqq-team-ubuntu-notepadqq-xenial.list.save <==
# deb http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial main
# deb-src http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial main
==> /etc/apt/sources.list.d/skype-stable.list <==
# deb [arch=amd64] https://repo.skype.com/deb stable main
==> /etc/apt/sources.list.d/skype-stable.list.distUpgrade <==
# deb [arch=amd64] https://repo.skype.com/deb stable main
==> /etc/apt/sources.list.d/skype-stable.list.save <==
# deb [arch=amd64] https://repo.skype.com/deb stable main
==> /etc/apt/sources.list.d/teamviewer.list <==
### TeamViewer DEB repository list
### NOTE: Manual changes to this file
### - prevent it from being updated by TeamViewer package updates
### - will be lost after using the 'teamviewer repo' command
### The original file can be restored with this command:
### cp /opt/teamviewer/tv_bin/script/teamviewer.list /etc/apt/sources.list.d/teamviewer.list
### which has the same effect as 'teamviewer repo default'
### NOTE: It is preferred to use the following commands to edit this file:
### teamviewer repo - show current repository configuration
### teamviewer repo default - restore default configuration
### teamviewer repo disable - disable the repository
### teamviewer repo main [stable] - make all TeamViewer packages available (default)
### teamviewer repo tv14 [stable] - make TeamViewer 14 packages available
### stable omit preview and beta releases
### Choose stable main to receive updates for TeamViewer 14 and upcoming major releases
### Choose preview main to receive early updates for TeamViewer 14 and to receive major beta releases
### Choose stable tv14 to receive updates for TeamViewer 14
### Choose preview tv14 to receive early updates for TeamViewer 14
# deb http://linux.teamviewer.com/deb stable main
# deb http://linux.teamviewer.com/deb preview main
# deb http://linux.teamviewer.com/deb stable tv14
# deb http://linux.teamviewer.com/deb preview tv14
==> /etc/apt/sources.list.d/teamviewer.list.save <==
### TeamViewer DEB repository list
### NOTE: Manual changes to this file
### - prevent it from being updated by TeamViewer package updates
### - will be lost after using the 'teamviewer repo' command
### The original file can be restored with this command:
### cp /opt/teamviewer/tv_bin/script/teamviewer.list /etc/apt/sources.list.d/teamviewer.list
### which has the same effect as 'teamviewer repo default'
### NOTE: It is preferred to use the following commands to edit this file:
### teamviewer repo - show current repository configuration
### teamviewer repo default - restore default configuration
### teamviewer repo disable - disable the repository
### teamviewer repo main [stable] - make all TeamViewer packages available (default)
### teamviewer repo tv14 [stable] - make TeamViewer 14 packages available
### stable omit preview and beta releases
### Choose stable main to receive updates for TeamViewer 14 and upcoming major releases
### Choose preview main to receive early updates for TeamViewer 14 and to receive major beta releases
### Choose stable tv14 to receive updates for TeamViewer 14
### Choose preview tv14 to receive early updates for TeamViewer 14
# deb http://linux.teamviewer.com/deb stable main
# deb http://linux.teamviewer.com/deb preview main
# deb http://linux.teamviewer.com/deb stable tv14
# deb http://linux.teamviewer.com/deb preview tv14
==> /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-xenial.list <==
# deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
==> /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-xenial.list.distUpgrade <==
# deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
==> /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-xenial.list.save <==
# deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
# deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main
==> /etc/apt/sources.list.d/webupd8team-ubuntu-java-bionic.list <==
==> /etc/apt/sources.list.d/webupd8team-ubuntu-java-bionic.list.save <==
답변1
16.04에서 18.04로의 업그레이드가 올바르게 수행되지 않았으며 저장소 구성이 대부분 주석 처리된 것 같습니다.
Ubuntu 저장소를 복구하려면,편집하다/etc/apt/sources.list
그래서 그것은 포함
deb http://ca.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
그런 다음 실행하면 apt update
설치할 수 있습니다 default-jre
.
또한 의 모든 파일을 검토해야 합니다 /etc/apt/sources.list.d
. .list.distUpgrade
문제가 없다고 생각되면 이름을 변경하여 해당 .distUpgrade
섹션을 제거하세요.