unable to install jdk and jre in ubuntu 14.04
I want to install jdk and jre in my ubuntu 14.04 and I got these following errors:
anil@anil:~$ sudo apt-get install default-jre
[sudo] password for anil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
default-jre : Depends: default-jre-headless (= 2:1.7-51) but it is not going to be installed
Depends: openjdk-7-jre (>= 7~u3-2.1.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
14.04 software-installation java dependencies openjdk
add a comment |
I want to install jdk and jre in my ubuntu 14.04 and I got these following errors:
anil@anil:~$ sudo apt-get install default-jre
[sudo] password for anil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
default-jre : Depends: default-jre-headless (= 2:1.7-51) but it is not going to be installed
Depends: openjdk-7-jre (>= 7~u3-2.1.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
14.04 software-installation java dependencies openjdk
can you provide me the output of/etc/apt/sources.list
?
– orvi
Aug 14 '15 at 4:21
can you provide me the output of /etc/apt/sources.list? anil@anil:~$ /etc/apt/sources.list bash: /etc/apt/sources.list: Permission denied
– Ravan
Aug 14 '15 at 5:33
login asroot
– orvi
Aug 14 '15 at 12:46
You've probably turned off automatic updates to stop it bugging you! Turn it back on? This worked for me.
– Alexander Kartun-Giles
Apr 27 '16 at 15:09
add a comment |
I want to install jdk and jre in my ubuntu 14.04 and I got these following errors:
anil@anil:~$ sudo apt-get install default-jre
[sudo] password for anil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
default-jre : Depends: default-jre-headless (= 2:1.7-51) but it is not going to be installed
Depends: openjdk-7-jre (>= 7~u3-2.1.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
14.04 software-installation java dependencies openjdk
I want to install jdk and jre in my ubuntu 14.04 and I got these following errors:
anil@anil:~$ sudo apt-get install default-jre
[sudo] password for anil:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
default-jre : Depends: default-jre-headless (= 2:1.7-51) but it is not going to be installed
Depends: openjdk-7-jre (>= 7~u3-2.1.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
14.04 software-installation java dependencies openjdk
14.04 software-installation java dependencies openjdk
edited Sep 24 '15 at 2:35
Ravan
asked Aug 14 '15 at 3:56
RavanRavan
5,733154577
5,733154577
can you provide me the output of/etc/apt/sources.list
?
– orvi
Aug 14 '15 at 4:21
can you provide me the output of /etc/apt/sources.list? anil@anil:~$ /etc/apt/sources.list bash: /etc/apt/sources.list: Permission denied
– Ravan
Aug 14 '15 at 5:33
login asroot
– orvi
Aug 14 '15 at 12:46
You've probably turned off automatic updates to stop it bugging you! Turn it back on? This worked for me.
– Alexander Kartun-Giles
Apr 27 '16 at 15:09
add a comment |
can you provide me the output of/etc/apt/sources.list
?
– orvi
Aug 14 '15 at 4:21
can you provide me the output of /etc/apt/sources.list? anil@anil:~$ /etc/apt/sources.list bash: /etc/apt/sources.list: Permission denied
– Ravan
Aug 14 '15 at 5:33
login asroot
– orvi
Aug 14 '15 at 12:46
You've probably turned off automatic updates to stop it bugging you! Turn it back on? This worked for me.
– Alexander Kartun-Giles
Apr 27 '16 at 15:09
can you provide me the output of
/etc/apt/sources.list
?– orvi
Aug 14 '15 at 4:21
can you provide me the output of
/etc/apt/sources.list
?– orvi
Aug 14 '15 at 4:21
can you provide me the output of /etc/apt/sources.list? anil@anil:~$ /etc/apt/sources.list bash: /etc/apt/sources.list: Permission denied
– Ravan
Aug 14 '15 at 5:33
can you provide me the output of /etc/apt/sources.list? anil@anil:~$ /etc/apt/sources.list bash: /etc/apt/sources.list: Permission denied
– Ravan
Aug 14 '15 at 5:33
login as
root
– orvi
Aug 14 '15 at 12:46
login as
root
– orvi
Aug 14 '15 at 12:46
You've probably turned off automatic updates to stop it bugging you! Turn it back on? This worked for me.
– Alexander Kartun-Giles
Apr 27 '16 at 15:09
You've probably turned off automatic updates to stop it bugging you! Turn it back on? This worked for me.
– Alexander Kartun-Giles
Apr 27 '16 at 15:09
add a comment |
5 Answers
5
active
oldest
votes
Your computer is missing packages needed to install default-jre.
Update the package list sudo apt-get update
and then run sudo apt-get -f install
this may fix the problem. or you can run sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
The last command is same as @Noctane said except he made a typo mistake in the command.
add a comment |
In regards to the broken packages, try installing the same package with aptitude. it will give up less easily, and will attempt to find solutions
which may involve modifying other packages.
You can also get a list of held packages with dpkg --get-selections | grep hold
, which could show you the issue.
Otherwise, maybe try installing openjdk and jre:
Doing a apt-cache search jdk
or apt-cache search jre
lists a lot of packages that might interest you. To install open JDK and JRE you would usesudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
you can replace the 7 with 6 or 8 if you would prefer openjdk 6 or 8
EDIT:
Fixed apt-get command, thanks @lesslazy
anil@anil:~$ sudo apt-get install openjdk-7-jdk open-jdk-7-jre Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package open-jdk-7-jre
– Ravan
Aug 14 '15 at 5:36
add a comment |
First run these commands in terminal (press Ctrl+Alt+T):
sudo apt-get --fix-broken install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get update
then following
Changed software and updates to main server
Unmarked all "other software" sources
Reload it and run for software update,it installed tzdata(i think this is the reason)
Run
sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
add a comment |
Maybe:
1) Try this:
http://www.upubuntu.com/2013/05/how-to-fix-broken-packages-using.html
2) Try to install java again.
add a comment |
You can try this:
sudo apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
Then, you will need to fully update the system with the following command:
sudo apt update
You can also install Java by using one of the following commands:
sudo apt install oracle-java6-installer
sudo apt install oracle-java7-installer
sudo apt install oracle-java8-installer
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f661228%2funable-to-install-jdk-and-jre-in-ubuntu-14-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your computer is missing packages needed to install default-jre.
Update the package list sudo apt-get update
and then run sudo apt-get -f install
this may fix the problem. or you can run sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
The last command is same as @Noctane said except he made a typo mistake in the command.
add a comment |
Your computer is missing packages needed to install default-jre.
Update the package list sudo apt-get update
and then run sudo apt-get -f install
this may fix the problem. or you can run sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
The last command is same as @Noctane said except he made a typo mistake in the command.
add a comment |
Your computer is missing packages needed to install default-jre.
Update the package list sudo apt-get update
and then run sudo apt-get -f install
this may fix the problem. or you can run sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
The last command is same as @Noctane said except he made a typo mistake in the command.
Your computer is missing packages needed to install default-jre.
Update the package list sudo apt-get update
and then run sudo apt-get -f install
this may fix the problem. or you can run sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
The last command is same as @Noctane said except he made a typo mistake in the command.
answered Aug 14 '15 at 5:48
lesslazylesslazy
499
499
add a comment |
add a comment |
In regards to the broken packages, try installing the same package with aptitude. it will give up less easily, and will attempt to find solutions
which may involve modifying other packages.
You can also get a list of held packages with dpkg --get-selections | grep hold
, which could show you the issue.
Otherwise, maybe try installing openjdk and jre:
Doing a apt-cache search jdk
or apt-cache search jre
lists a lot of packages that might interest you. To install open JDK and JRE you would usesudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
you can replace the 7 with 6 or 8 if you would prefer openjdk 6 or 8
EDIT:
Fixed apt-get command, thanks @lesslazy
anil@anil:~$ sudo apt-get install openjdk-7-jdk open-jdk-7-jre Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package open-jdk-7-jre
– Ravan
Aug 14 '15 at 5:36
add a comment |
In regards to the broken packages, try installing the same package with aptitude. it will give up less easily, and will attempt to find solutions
which may involve modifying other packages.
You can also get a list of held packages with dpkg --get-selections | grep hold
, which could show you the issue.
Otherwise, maybe try installing openjdk and jre:
Doing a apt-cache search jdk
or apt-cache search jre
lists a lot of packages that might interest you. To install open JDK and JRE you would usesudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
you can replace the 7 with 6 or 8 if you would prefer openjdk 6 or 8
EDIT:
Fixed apt-get command, thanks @lesslazy
anil@anil:~$ sudo apt-get install openjdk-7-jdk open-jdk-7-jre Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package open-jdk-7-jre
– Ravan
Aug 14 '15 at 5:36
add a comment |
In regards to the broken packages, try installing the same package with aptitude. it will give up less easily, and will attempt to find solutions
which may involve modifying other packages.
You can also get a list of held packages with dpkg --get-selections | grep hold
, which could show you the issue.
Otherwise, maybe try installing openjdk and jre:
Doing a apt-cache search jdk
or apt-cache search jre
lists a lot of packages that might interest you. To install open JDK and JRE you would usesudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
you can replace the 7 with 6 or 8 if you would prefer openjdk 6 or 8
EDIT:
Fixed apt-get command, thanks @lesslazy
In regards to the broken packages, try installing the same package with aptitude. it will give up less easily, and will attempt to find solutions
which may involve modifying other packages.
You can also get a list of held packages with dpkg --get-selections | grep hold
, which could show you the issue.
Otherwise, maybe try installing openjdk and jre:
Doing a apt-cache search jdk
or apt-cache search jre
lists a lot of packages that might interest you. To install open JDK and JRE you would usesudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
you can replace the 7 with 6 or 8 if you would prefer openjdk 6 or 8
EDIT:
Fixed apt-get command, thanks @lesslazy
edited Aug 14 '15 at 9:19
answered Aug 14 '15 at 4:15
NoctaneNoctane
118
118
anil@anil:~$ sudo apt-get install openjdk-7-jdk open-jdk-7-jre Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package open-jdk-7-jre
– Ravan
Aug 14 '15 at 5:36
add a comment |
anil@anil:~$ sudo apt-get install openjdk-7-jdk open-jdk-7-jre Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package open-jdk-7-jre
– Ravan
Aug 14 '15 at 5:36
anil@anil:~$ sudo apt-get install openjdk-7-jdk open-jdk-7-jre Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package open-jdk-7-jre
– Ravan
Aug 14 '15 at 5:36
anil@anil:~$ sudo apt-get install openjdk-7-jdk open-jdk-7-jre Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package open-jdk-7-jre
– Ravan
Aug 14 '15 at 5:36
add a comment |
First run these commands in terminal (press Ctrl+Alt+T):
sudo apt-get --fix-broken install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get update
then following
Changed software and updates to main server
Unmarked all "other software" sources
Reload it and run for software update,it installed tzdata(i think this is the reason)
Run
sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
add a comment |
First run these commands in terminal (press Ctrl+Alt+T):
sudo apt-get --fix-broken install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get update
then following
Changed software and updates to main server
Unmarked all "other software" sources
Reload it and run for software update,it installed tzdata(i think this is the reason)
Run
sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
add a comment |
First run these commands in terminal (press Ctrl+Alt+T):
sudo apt-get --fix-broken install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get update
then following
Changed software and updates to main server
Unmarked all "other software" sources
Reload it and run for software update,it installed tzdata(i think this is the reason)
Run
sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
First run these commands in terminal (press Ctrl+Alt+T):
sudo apt-get --fix-broken install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get update
then following
Changed software and updates to main server
Unmarked all "other software" sources
Reload it and run for software update,it installed tzdata(i think this is the reason)
Run
sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless
edited Mar 9 '17 at 18:04
Community♦
1
1
answered Aug 14 '15 at 6:48
RavanRavan
5,733154577
5,733154577
add a comment |
add a comment |
Maybe:
1) Try this:
http://www.upubuntu.com/2013/05/how-to-fix-broken-packages-using.html
2) Try to install java again.
add a comment |
Maybe:
1) Try this:
http://www.upubuntu.com/2013/05/how-to-fix-broken-packages-using.html
2) Try to install java again.
add a comment |
Maybe:
1) Try this:
http://www.upubuntu.com/2013/05/how-to-fix-broken-packages-using.html
2) Try to install java again.
Maybe:
1) Try this:
http://www.upubuntu.com/2013/05/how-to-fix-broken-packages-using.html
2) Try to install java again.
answered Aug 14 '15 at 9:22
Mario KamenjakMario Kamenjak
6551924
6551924
add a comment |
add a comment |
You can try this:
sudo apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
Then, you will need to fully update the system with the following command:
sudo apt update
You can also install Java by using one of the following commands:
sudo apt install oracle-java6-installer
sudo apt install oracle-java7-installer
sudo apt install oracle-java8-installer
New contributor
add a comment |
You can try this:
sudo apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
Then, you will need to fully update the system with the following command:
sudo apt update
You can also install Java by using one of the following commands:
sudo apt install oracle-java6-installer
sudo apt install oracle-java7-installer
sudo apt install oracle-java8-installer
New contributor
add a comment |
You can try this:
sudo apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
Then, you will need to fully update the system with the following command:
sudo apt update
You can also install Java by using one of the following commands:
sudo apt install oracle-java6-installer
sudo apt install oracle-java7-installer
sudo apt install oracle-java8-installer
New contributor
You can try this:
sudo apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
Then, you will need to fully update the system with the following command:
sudo apt update
You can also install Java by using one of the following commands:
sudo apt install oracle-java6-installer
sudo apt install oracle-java7-installer
sudo apt install oracle-java8-installer
New contributor
New contributor
answered 1 min ago
mitesh7172mitesh7172
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f661228%2funable-to-install-jdk-and-jre-in-ubuntu-14-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
can you provide me the output of
/etc/apt/sources.list
?– orvi
Aug 14 '15 at 4:21
can you provide me the output of /etc/apt/sources.list? anil@anil:~$ /etc/apt/sources.list bash: /etc/apt/sources.list: Permission denied
– Ravan
Aug 14 '15 at 5:33
login as
root
– orvi
Aug 14 '15 at 12:46
You've probably turned off automatic updates to stop it bugging you! Turn it back on? This worked for me.
– Alexander Kartun-Giles
Apr 27 '16 at 15:09