LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 07-21-2014, 02:42 PM   #1
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

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


So I am trying to install openvpn on Debian 7.5.0. However when I do
Code:
apt-get install openvpn
as the root user this comes up:

Code:
Reading package lists...Done
building dependency tree
Reading state information...Done
E: Unable to locate package openvpn
Tanks in advance for the help
 
Old 07-21-2014, 03:04 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Is your computer connected to the internet and have you run "apt-get update" and what is in your sources.list?
A quick look at the Debian Packages site shows openvpn should be available for Wheezy (and Jessie and Sid).
https://packages.debian.org/wheezy/openvpn
 
1 members found this post helpful.
Old 07-21-2014, 03:07 PM   #3
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Im pretty new with linux, so I dont know how to view contents of sources.list. Yes, I have tried apt-get update
 
Old 07-21-2014, 03:22 PM   #4
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Is your computer connected to the internet and have you run "apt-get update" and what is in your sources.list?
A quick look at the Debian Packages site shows openvpn should be available for Wheezy (and Jessie and Sid).
https://packages.debian.org/wheezy/openvpn
Contents of sources.list was:

deb cdrom:[Debian GNU/Linux 7 _Wheezy_ - Official Snapshot i386 LIVE/INSTALL Binary 20140505-05:08]/ wheezy main
 
Old 07-21-2014, 03:29 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
How did you install Debian? It seems that apt is only looking at the CDROM for packages so if the packages is not on the CDROM (and many are not) you won't be able to install it at all.
The file /etc/apt/sources.list tells apt where to look for packages on the internet:
https://wiki.debian.org/SourcesList
If you don't have your machine connected to the internet (you didn't answer that question) you will have to find some other way of downloading packages.
 
1 members found this post helpful.
Old 07-21-2014, 03:31 PM   #6
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
My machine is connected to the internet and I installed Debian from a CD. Even if I remove the CD the package is unlocatable
 
Old 07-21-2014, 03:49 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Your sources.list doesn't contain any software sources, so apt doesn't know where to look for software. It should look something like the following:
https://wiki.debian.org/SourcesList#...7_.22Wheezy.22
Ideally you would point to Debian mirrors nearer to you but that should at least allow you to install software.
 
1 members found this post helpful.
Old 07-21-2014, 03:59 PM   #8
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Your sources.list doesn't contain any software sources, so apt doesn't know where to look for software. It should look something like the following:
https://wiki.debian.org/SourcesList#...7_.22Wheezy.22
Ideally you would point to Debian mirrors nearer to you but that should at least allow you to install software.
How do I do that?
 
Old 07-21-2014, 04:07 PM   #9
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
You edit the file /etc/apt/sources.list to contain those lines then run apt-get update. I tend to comment out the line for the CDROM, but you don't have to, by adding "#" (without the quotes) at the beginning of the line.
You can edit the file with any editor you like but it must be done as root.
 
1 members found this post helpful.
Old 07-21-2014, 04:32 PM   #10
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
You edit the file /etc/apt/sources.list to contain those lines then run apt-get update. I tend to comment out the line for the CDROM, but you don't have to, by adding "#" (without the quotes) at the beginning of the line.
You can edit the file with any editor you like but it must be done as root.
Ok thanks a lot I will try this asap.
 
Old 07-22-2014, 01:32 PM   #11
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
You edit the file /etc/apt/sources.list to contain those lines then run apt-get update. I tend to comment out the line for the CDROM, but you don't have to, by adding "#" (without the quotes) at the beginning of the line.
You can edit the file with any editor you like but it must be done as root.
So I just finished editing the file to contain those lines and I commented the cdrom line with a "#" however than it says that those lines were commented because they couldnt be veryfied. Did my research and it turns out that that happens because I did not configure the network while installing debian. So I found a site that generated the "sources.list" file for canadians tried that and the same error comes again

Code:
E: Unable to locate package openvpn
 
Old 07-22-2014, 01:38 PM   #12
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Once you have edited the file you should run "apt-get update" to make sure that apt knows which packages are available (this may take a while first time it is run) then run "apt-get upgrade" to ensure that you install any bugfixes and security updates (this, again, may take a while). If both those commands work you should be good to go installing openvpn. If those commands return any errors then let use know here.
 
1 members found this post helpful.
Old 07-22-2014, 02:13 PM   #13
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Once you have edited the file you should run "apt-get update" to make sure that apt knows which packages are available (this may take a while first time it is run) then run "apt-get upgrade" to ensure that you install any bugfixes and security updates (this, again, may take a while). If both those commands work you should be good to go installing openvpn. If those commands return any errors then let use know here.
Ran "apt-get update" still didnt work. I returned to the website that generated the "sources.list" file and added security and updates. Then I ran "apt-get update" and it worked so after that I was able to do "apt-get openvpn" without any further problems.

Thank you very much for your help it was much apreciated
 
Old 07-22-2014, 02:22 PM   #14
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Glad to hear you got it working and thanks -- I'll have to remember this needs doing if the install is done without setting up network.
Remember to mark the thread solved also, by clicking the link towards the top of the page.
 
Old 07-22-2014, 03:29 PM   #15
CrypticUser
LQ Newbie
 
Registered: Jul 2014
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Glad to hear you got it working and thanks -- I'll have to remember this needs doing if the install is done without setting up network.
Remember to mark the thread solved also, by clicking the link towards the top of the page.
No problem also here is the link to the "sources.list" file. http://debgen.simplylinux.ch/ Have a great day
 
1 members found this post helpful.
  


Reply



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 gfortran mikebaiduu Linux - Newbie 7 10-08-2013 11:26 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
Unable to locate package VSFTP LoneWolf69 Linux - Newbie 2 08-22-2011 04:58 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 02:46 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