LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-23-2016, 06:47 PM   #1
Jerry1947
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Rep: Reputation: Disabled
Apt-get error message when trying to install i2c-tools


I am a new Linux user working on a Raspberry Pi. In response to the command "sudo apt-get install i2c-tools", I received the following error messages: Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: libi2c-dev python-smbus The following NEW packages will be installed: i2c-tools 0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded. Need to get 59.5 kB of archives. After this operation, 223 kB of additional disk space will be used. Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main i2c-tools armhf 3.1.0-2 Temporary failure resolving 'mirrordirector.raspbian.org' Failed to fetch http://mirrordirector.raspbian.org/r....0-2_armhf.deb Temporary failure resolving 'mirrordirector.raspbian.org' E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? I would greatly appreciate any help in understanding what the problem and how I can rerun the command successfully. Thanks Jerry
 
Old 03-24-2016, 12:23 PM   #2
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
Did you run
Code:
sudo apt-get update
You need to always do this before you run 'sudo apt-get install'.
The 'update' command updates the packages list of your repository.
After that, when you run 'sudo apt-get install <package-name>' the package will be found in the correct location.

This link also mentions 'upgrade' and 'dist-upgrade' too https://askubuntu.com
 
Old 03-24-2016, 07:31 PM   #3
Jerry1947
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Higgsboson:

I followed your suggestion and ran the "sudo apt-get update" command which outputted
the following error messages:

Err http://archive.raspberrypi.org wheezy Release.gpg
Temporary failure resolving 'archive.raspberrypi.org'
Err http://mirrordirector.raspbian.org wheezy Release.gpg
Temporary failure resolving 'mirrordirector.raspbian.org'
Err http://raspberrypi.collabora.com wheezy Release.gpg
Temporary failure resolving 'raspberrypi.collabora.com'
Reading package lists... Done
W: Failed to fetch http://mirrordirector.raspbian.org/r...zy/Release.gpg Temporary failure resolving 'mirrordirector.raspbian.org'
W: Failed to fetch http://raspberrypi.collabora.com/dis...zy/Release.gpg Temporary failure resolving 'raspberrypi.collabora.com'
W: Failed to fetch http://archive.raspberrypi.org/debia...zy/Release.gpg Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.



I then went back to the original error messages for the apt-get install command and noticed the line:
"Temporary failure resolving 'mirrordirector.raspbian.org'
Failed to fetch http://mirrordirector.raspbian.org/r....0-2_armhf.deb Temporary failure resolving 'mirrordirector.raspbian.org'

I then used the URL it said it couldn't resolve and was able to access the file on my browser so I know it is there.

Finally I looked at the sources list of my system (/etc/apt/sources.list) and it contains the line:
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

This line doesn't seem to me to be correct as the URL does not match the one in the error message.

Could I solve the problem by just replacing "deb http://mirrordirector.raspbian.org/raspbian/ wheezy main" with
"http://mirrordirector.raspbian.org/raspbian/pool/main/i/i2c-tools/i2c-tools_3.1.0-2_armhf.deb" in the sources.list file

Since I am a new user of linus I'm reluctant to change it without first running it by an experienced user. Do you think that this is the problem ?

Thanks for your help

Jerry

BTW: I know this reply is a bit wordy but I come from a System Test software background and was
always told to put in as much detail as possible when writing up a bug.
 
Old 03-25-2016, 12:39 PM   #4
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
Quote:
Originally Posted by Jerry1947 View Post
Could I solve the problem by just replacing "deb http://mirrordirector.raspbian.org/raspbian/ wheezy main" with
"http://mirrordirector.raspbian.org/raspbian/pool/main/i/i2c-tools/i2c-tools_3.1.0-2_armhf.deb" in the sources.list file
This won't work because the mirror site for your repository in /etc/apt/sources.list is correct.

It seems you may have an internet connection problem. Are you using wifi? apt-get-installation-doesnt-work-on-raspberry-pi
 
1 members found this post helpful.
Old 03-25-2016, 05:20 PM   #5
Jerry1947
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Jerry

Higgsboson:

Yes I am using a Wi-Fi connection. After looking at the URL you pointed me
to, I reconnected my Raspberry Pi directly to the LAN cable and retried the two commands.
Unfortunately this did not fix the problem. I was wondering if sending to another
mirror site would be worth trying and if so how would I determine what I have to
put in the /etc/apt/sources.list file.


Thank you for all your help

Jerry
 
Old 03-25-2016, 05:29 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Sometimes the Raspberry mirror goes down in my experience. You may want to try waiting a day to see if the problem fixes itself.
 
Old 03-25-2016, 07:34 PM   #7
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
Quote:
Originally Posted by Jerry1947 View Post
Higgsboson:
Yes I am using a Wi-Fi connection. After looking at the URL you pointed me
to, I reconnected my Raspberry Pi directly to the LAN cable and retried the two commands.
Unfortunately this did not fix the problem. I was wondering if sending to another
mirror site would be worth trying and if so how would I determine what I have to
put in the /etc/apt/sources.list file.
This link shows the 'master' repos for Raspbian and all its mirror sites depending on your location: https://www.raspbian.org/RaspbianRepository

If you choose a repos from your country of origin (or near to it) then the downloads should be faster.
Since you have 'mirrordirector' in your /etc/apt/sources.list, then it is part of the 'mirror redirection system'. https://www.raspbian.org/RaspbianMirrors

So you may indeed try a different mirror repos to see if it helps.
Simply delete your mirrordirector url in /etc/apt/sources.list and replace it with an url beginning with 'http...'.

Is there a new error message you're getting?

Last edited by Higgsboson; 03-25-2016 at 07:38 PM.
 
Old 03-25-2016, 07:53 PM   #8
User9
Member
 
Registered: Mar 2016
Location: Boston
Distribution: Arch Linux, Debian, Ubuntu Server, FreeBSD, FreeNAS
Posts: 53

Rep: Reputation: Disabled
are you 100% sure your internet is up ?

can u ping google.com while logged into your rasberry pi ? (<ctrl> + c will stop command)

Last edited by User9; 03-25-2016 at 07:55 PM.
 
Old 03-28-2016, 07:21 PM   #9
Jerry1947
LQ Newbie
 
Registered: Mar 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Guys:

As per suicidaleggroll's suggestion, I retried the commands and they all worked perfectly :-).
I really appreciate all the suggestions that were sent to me and because of the time spent
trying those suggestion and doing some reading based on them, I feel I had gained some additional
knowledge and experience with Linux. As a wise man once said: You learn a lot more from your failures
than you ever do from your successes.
 
  


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
Error message when using apt-get in debian bhudlemeyer Debian 19 03-13-2007 07:24 PM
apt-listbugs error message luis14 Debian 4 02-28-2007 03:27 AM
apt error message vanigh Ubuntu 3 07-28-2006 09:23 AM
apt-get error message amon Debian 3 03-28-2005 01:22 PM
Apt-get error message silentnights Mandriva 6 09-22-2003 12:10 AM

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

All times are GMT -5. The time now is 04:44 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