LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-07-2017, 04:13 PM   #1
Gervaisnsengiyumva
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
E: Unable to locate package Jdk


can someone help me pleaseto install jdk, i am using ubuntu 16.06LTs


gervais@gervais:~$ sudo apt install jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package jdk
gervais@gervais:~
 
Old 11-07-2017, 04:34 PM   #2
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 905

Rep: Reputation: 246Reputation: 246Reputation: 246
Quote:
Originally Posted by Gervaisnsengiyumva View Post
can someone help me pleaseto install jdk, i am using ubuntu 16.06LTs


gervais@gervais:~$ sudo apt install jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package jdk
gervais@gervais:~
You got the package name wrong. Run
Code:
apt search jdk
to look for the right package. If you want the jdk 8, the right install command would be
Code:
sudo apt install openjdk-8-jdk
 
Old 11-08-2017, 01:31 AM   #3
Gervaisnsengiyumva
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by joe_2000 View Post
You got the package name wrong. Run
Code:
apt search jdk
to look for the right package. If you want the jdk 8, the right install command would be
Code:
sudo apt install openjdk-8-jdk

Thank You so much Brother it works now!
 
Old 11-08-2017, 02:12 AM   #4
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 905

Rep: Reputation: 246Reputation: 246Reputation: 246
Quote:
Originally Posted by Gervaisnsengiyumva View Post
Thank You so much Brother it works now!
Good to hear that! Please mark the thread as "solved" then. And welcome to LQ.org...
 
Old 11-09-2017, 03:33 AM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,588
Blog Entries: 1

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
jdk is the java developer kit. Which is not the name of the actual package as you've found out. Some tools like aptitude might understand the shorthand and figure it though. Otherwise you need to discover the package name, which does NOT require google or other avenues. That ability already exist in your distro by various means.

$ apt-cache search --names-only jdk

$ dpkg-query --load-avail -l '*jdk*'

If you know a file specific to jdk, you could use apt-file to find the package that contains that file.

$ apt-file find bin/jconsole

And probably other ways.
 
  


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
unable to locate package dunnery Debian 5 12-27-2016 05:54 AM
[SOLVED] E: Unable to locate package ... DKI Linux - Newbie 7 11-16-2014 03:40 PM
E:unable to locate package hafiznasrullah Linux - Server 7 09-10-2012 07:42 AM
[SOLVED] E: Unable to locate package nova-comm E: Unable to locate package python-psycopq2 mint12 Linux - Virtualization and Cloud 2 01-05-2012 12:07 PM
[SOLVED] E: Unable to locate package lamis0 Ubuntu 4 03-27-2011 06:33 AM

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

All times are GMT -5. The time now is 05:29 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration