0

I just tried sudo apt-get install i2c-tools and got the following output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package i2c-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'i2c-tools' has no installation candidate

Naturally, I tried sudo apt-get update and again attempted to install i2c-tools only to end up with the same result.

It seems like i2c-tools should still be available because

$ cat Downloads/Packages | grep i2c-tools
Package: i2c-tools
Filename: pool/main/i/i2c-tools/i2c-tools_3.1.0-2_armhf.deb
Source: i2c-tools
Recommends: i2c-tools
Filename: pool/main/i/i2c-tools/libi2c-dev_3.1.0-2_all.deb
Suggests: fancontrol, sensord, read-edid, i2c-tools
Source: i2c-tools
Recommends: i2c-tools
Filename: pool/main/i/i2c-tools/python-smbus_3.1.0-2_armhf.deb

where Downloads/Packages is http://archive.raspbian.org/raspbian/dists/wheezy/main/binary-armhf/Packages (see http://www.raspbian.org/RaspbianFAQ#Do_you_have_a_list_of_all_the_packages_in_the_Raspbian_repository.3F)

Some quick Googling make me try this

$ apt-cache policy i2c-tools i2c-tools
i2c-tools:
  Installed: (none)
  Candidate: (none)
  Version table:
     3.1.1-1 0
        -10 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
        -10 http://archive.raspbian.org/raspbian/ jessie/main armhf Packages
     3.1.0-2 0
        -10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages
        -10 http://archive.raspbian.org/raspbian/ wheezy/main armhf Packages
i2c-tools:
  Installed: (none)
  Candidate: (none)
  Version table:
     3.1.1-1 0
        -10 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
        -10 http://archive.raspbian.org/raspbian/ jessie/main armhf Packages
     3.1.0-2 0
        -10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages
        -10 http://archive.raspbian.org/raspbian/ wheezy/main armhf Packages

which also makes it seem like I should be able to install it.

edit: I'm not sure if this is helpful, but this is the version I'm running:

$ uname -a
Linux raspi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux

@doh-nutz After trying sudo apt-get update, here's what I got:

$ apt-cache search i2c
pypy-smbus-cffi - This Python module allows SMBus access through the I2C /dev
$ cat /etc/apt/sources.list | grep "deb hxxp://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi"
deb hxxp://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

(the hxxp was actually http, but I need 10+ rep to post more than two links)

2
$ sudo apt-get install -t wheezy i2c-tools

worked, and I have a feeling that

$ sudo apt-get install -t jessie i2c-tools

would have also worked. I guess apt-get was confused as to which Debian source I wanted to use, so it gave a somewhat unhelpful error message.

(Credit goes to http://somewideopenspace.wordpress.com/2014/02/28/gcc-4-8-on-raspberry-pi-wheezy/ for suggesting to me what to do.)

0

Have you tried this (after sudo apt-get update):

apt-cache search i2c

For me the output is (among others):

i2c-tools - heterogeneous set of I2C tools for Linux

In my /etc/apt/sources.list, i have the following line (maybe you're missing some of the options like contrib or non-free):

deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
  • Unfortunately, that didn't seem to work. I edited my original post to reflect that. – Ryan M Aug 10 '14 at 3:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.