LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2017, 03:10 AM   #1
abdmet74@gmail.com
LQ Newbie
 
Registered: Apr 2017
Location: beirut
Posts: 26

Rep: Reputation: Disabled
update java version in centOS6.4


hi all
i am using centOS6.4 when i verified the version it is 1.6, i would like to ask if there is a way to upgrade java versio to Java 8??
thank you
 
Old 04-12-2017, 03:56 AM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
first off upgrade CentOS, like the entire thing, CentOS 6.4 is highly out of date. The package you are probably after is java-1.8.0-openjdk.x86_64, The following should be a good indicator

Code:
root@vded12490 [~]# yum list available *openjdk*
 
1 members found this post helpful.
Old 04-12-2017, 04:18 AM   #3
abdmet74@gmail.com
LQ Newbie
 
Registered: Apr 2017
Location: beirut
Posts: 26

Original Poster
Rep: Reputation: Disabled
Code:
root@vded12490 [~]# yum list available *openjdk*
[/QUOTE]

i try this code i am getting the following result
[root@localhost oracle]# yum list available *openjdk*
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink | 6.5 kB 00:00
* base: mirror.steadfast.net
* epel: ftp.jaist.ac.jp
* extras: mirror.steadfast.net
* livna: wftp.tu-chemnitz.de
* nux-dextop: mirror.li.nux.ro
* remi-safe: mirrors.netix.net
* rpmfusion-free-updates: kartolo.sby.datautama.net.id
* rpmfusion-nonfree-updates: kartolo.sby.datautama.net.id
* updates: mirror.steadfast.net
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
livna | 1.3 kB 00:00
nux-dextop | 2.9 kB 00:00
remi-safe | 2.9 kB 00:00
rpmfusion-free-updates | 3.0 kB 00:00
rpmfusion-nonfree-updates | 3.0 kB 00:00
tejas-barot-vlc | 13 B 00:00 ...
Error: requested datatype primary not available
[root@localhost oracle]#
 
Old 04-12-2017, 04:37 AM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Sounds like the yum cache maybe corrupted, I'd suggest cleaning it

Code:
yum clean all
rpm rebuilddb
If that doesn't work then I'd recommend disabling all the repos and manually enabling them one at a time to test.
 
Old 04-12-2017, 04:58 AM   #5
abdmet74@gmail.com
LQ Newbie
 
Registered: Apr 2017
Location: beirut
Posts: 26

Original Poster
Rep: Reputation: Disabled
it that doesn't work then I'd recommend disabling all the repos and manually enabling them one at a time to test.

still i have an error l here is my session
[root@localhost oracle]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: base epel extras livna nux-dextop remi-safe
: rpmfusion-free-updates rpmfusion-nonfree-updates tejas-barot-vlc
: updates
Cleaning up Everything
[root@localhost oracle]# rpm rebuilddb
RPM version 4.8.0
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL[root@localhost oracle]# rpm -ivh rebuilddb
error: open of rebuilddb failed: No such file or directory
[root@localhost oracle]# yum list available *openjdk*
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
epel/metalink | 6.5 kB 00:00
* base: centos.mirror.iweb.ca
* epel: ir.mirror.rasanegar.com
* extras: centos.mirror.iweb.ca
* livna: rpm.livna.org
* nux-dextop: mirror.li.nux.ro
* remi-safe: remi.schlundtech.de
* rpmfusion-free-updates: mirror.smartmedia.net.id
* rpmfusion-nonfree-updates: mirror.smartmedia.net.id
* updates: centos.mirror.iweb.ca
base | 3.7 kB 00:00
base/primary_db | 4.7 MB 03:51
epel | 4.3 kB 00:01
epel/primary_db | 5.9 MB 04:30
extras | 3.4 kB 00:00
extras/primary_db | 37 kB 00:00
livna | 1.3 kB 00:00
livna/primary | 1.7 kB 00:00
livna 5/5
nux-dextop | 2.9 kB 00:00
nux-dextop/primary_db | 1.7 MB 00:18
remi-safe | 2.9 kB 00:00
remi-safe/primary_db | 724 kB 00:07
rpmfusion-free-updates | 3.0 kB 00:00
rpmfusion-free-updates/primary_db | 167 kB 00:03
rpmfusion-nonfree-updates | 3.0 kB 00:00
rpmfusion-nonfree-updates/primary_db | 22 kB 00:01
tejas-barot-vlc | 13 B 00:00 ...
Error: requested datatype primary not available

Plz Can you give me more details about how to disabling all the repos and manually enabling them one at a time to test
thank you
 
Old 04-12-2017, 05:05 AM   #6
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
the repos are in /etc/yum.repos.d

First thing, back-up the current repos

Code:
cp -r /etc/yum.repos.d /etc/yum.repos.old
next go into /etc/yum.repos.d and list all the files

Code:
# cd /etc/yum.repos.d
# ls -l
# ll
total 28
-rw-r--r--. 1 root root 1694 Jul  4  2016 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 Dec  9  2015 CentOS-CR.repo
-rw-r--r--. 1 root root  649 Dec  9  2015 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  290 Dec  9  2015 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 Dec  9  2015 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 Dec  9  2015 CentOS-Sources.repo
-rw-r--r--. 1 root root 1952 Dec  9  2015 CentOS-Vault.repo
you'll need to edit them so that any that have enabled=1 become set to enabled=0

Code:
# grep -n "enabled" CentOS-Base.repo
19:enabled=1
28:enabled=1
37:enabled=1
45:enabled=0
# sed -i 's/enabled=1/enabled=0/g' CentOS-Base.repo
# grep -n "enabled" /etc/yum.repos.d/CentOS-Base.repo
19:enabled=0
28:enabled=0
37:enabled=0
45:enabled=0
do that too all repos and keep a record of where the enabled=1 were. Now one at a time re-enable the enabled=1 lines and test yum after each one. Just to note, you need to disable EVERY repo in every file. When having 0 active repos, naturally no packages will be found, would also recommend cleaning the cache again when at 0 repos, so doing another 'yum clean all'.

Last edited by r3sistance; 04-12-2017 at 05:09 AM.
 
1 members found this post helpful.
Old 04-12-2017, 07:18 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,804

Rep: Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973Reputation: 6973
Quote:
Originally Posted by abdmet74@gmail.com View Post
hi all
i am using centOS6.4 when i verified the version it is 1.6, i would like to ask if there is a way to upgrade java versio to Java 8??
Please stop opening new threads for what is, most probably, a continuation of your other threads:
http://www.linuxquestions.org/questi...es-4175603383/
http://www.linuxquestions.org/questi...ar-4175603311/

...which are ALL Java related, for your installation of Oracle. Where you said you were going to contact Oracle support. And as you were also told before, CentOS 6.4 is old, and reaches END-OF-LIFE May of 2017 (just a couple of weeks):
https://wiki.centos.org/About/Produc...64b566d648c7-1

...so it's not very surprising that the latest-and-greatest Java isn't available in the repos you have. And one of the very first hits in Google for "how to install java 1.8 on centos 6.4" is:
https://gist.github.com/rjurney/7c855a0afa48777755d2

...complete instructions on how to do this. You've also been asked previously to not use text-speak (it's "please" not "plz"), and to post things in CODE tags to make them easier to read.
 
1 members found this post helpful.
Old 04-12-2017, 08:55 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,314
Blog Entries: 13

Rep: Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370Reputation: 4370
Hi abdmet74,

While this is not an exact repeat of your former threads, it seems related. Further to this, several members have commented that the software change actions which you're asking about are clearly difficult, or near impossible, citing also that the version of the OS is a main reason for these problems.

Similar to my comment in your other thread, you are asking questions, but not always following up with advice or requests for specific info. You are not helping others to help you with this behavior. Everyone at LQ is a volunteer, they are not paid to give support. We try to give guidelines for how to best formulate and ask your questions, please re-review those here in the Site FAQ.

As you can see, people here will try to help you, however if you ignore their questions or feedback, or start parallel threads which are related to the original problem, then this may cause frustration on the part of those members.

Please consider this before you make any future posts or create additional threads, and try to be clear about the problem, illustrating what you have done already, and organized with your questions.

Best Regards.
 
3 members found this post helpful.
Old 04-13-2017, 06:39 AM   #9
abdmet74@gmail.com
LQ Newbie
 
Registered: Apr 2017
Location: beirut
Posts: 26

Original Poster
Rep: Reputation: Disabled
update java version in centOS6.4

Dear Mr rtmistler
in fact i review the link about the forum rules ; i did not see anything of my behaviours where i had broken the rules.i ask questions that are not highly related to each other; in addition when the forum member's replies are helpful i marked them as helpful, same if the answers are correct. about my questions subject i review them, some of them are related to Linux library, some of them are related to centOS java version, i think they are not strongly related one to each others. all these questions are on the other hands related to the forum place(linux).
any way i would like to thank all the forum members and i would express my apologize if something wrong issued from my questions
thanks
 
Old 04-13-2017, 06:42 AM   #10
abdmet74@gmail.com
LQ Newbie
 
Registered: Apr 2017
Location: beirut
Posts: 26

Original Poster
Rep: Reputation: Disabled
Dear Mr rtmistler
in fact i review the link about the forum rules ; i did not see anything of my behaviours where i had broken the rules.i ask questions that are not highly related to each other; in addition when the forum member's replies are helpful i marked them as helpful, same if the answers are correct. about my questions subject i review them, some of them are related to Linux library, some of them are related to centOS java version, i think they are not strongly related one to each others. all these questions are on the other hands related to the forum place(linux).
any way i would like to thank all the forum members and i would express my apologize if something wrong issued from my questions
thanks
 
Old 04-13-2017, 08:43 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,424

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
@abdmet74@gmail.com : Java 8 can be installed to CentOS 6.9 ...

Example https://tecadmin.net/install-java-8-...el-and-fedora/
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting JAVA_HOME after automatic update of Java to the latest version BinDigit1 Linux - General 1 07-23-2009 06:21 PM
java new version wont update fs11 Programming 3 07-11-2008 04:08 AM
Install Java (update to new version) lionround Linux - Newbie 3 10-12-2007 10:21 PM
Update Java Version hytechpro Programming 1 01-09-2006 10:14 AM
Update Red Hat 9 Java version! mike_tom Linux - Distributions 1 08-01-2003 09:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration