I was following a tutorial online so I can install a USB DisplayLink monitor, and it told me to type:
sudo apt-get install git-core gcc-4.6-arm-linux-gnueabi
I tried that, and it says it "cannot locate the package". Please help
I was following a tutorial online so I can install a USB DisplayLink monitor, and it told me to type:
sudo apt-get install git-core gcc-4.6-arm-linux-gnueabi
I tried that, and it says it "cannot locate the package". Please help
As RPi Awesomeness points out, run apt-get update
and then apt-get upgrade
before you do anything.
apt-get
is part of the Debian package management system used on, e.g., raspbian.
Unless you are certain of what you want to install, it is usually a good idea to see exactly what is available first. apt-cache search
will provide a list matching a string, for example;
> apt-cache search git-core
devscripts - scripts to make the life of a Debian Package maintainer easier
git - fast, scalable, distributed revision control system
git-core - fast, scalable, distributed revision control system (obsolete)
It's not always obvious why the search returns the things it does, but in any case, here we have confirmation that git-core
exists and is available, although there is the note that it is obsolete. We could broaden the seach by using just git
, but this returns more than 500 results. However, if we filter via grep
(see man grep
), we can apply a regular expression so that only packages with "git" at the beginning of their name are returned:
apt-cache search git | grep "^git"
This limits us to a more manageable 30-40 hits, the first of which is:
git - fast, scalable, distributed revision control system
That's the package you actually want. For "gcc-4.6-arm-linux-gnueabi", we could try apt-cache search gcc | grep gnueabi
-- but that returns nothing. The same regexp trick might work (just plan search gcc
will return way too much again):
apt-cache search gcc | grep "^gcc"
A single screenful, which is easy to glance over. But there is no mention of "gnueabi".
"arm-linux-gnueabi" is actually a tuple used to identify the target of a compiler. In this case, the target is the same as the base system, so we can assume that the normal compiler will work in this case (it would have been good if you had included a link to the instructions you are following). We just need to make sure we get at least version 4.6; the list returned from the last search (which I omitted here) contains reference to 4.4 through 4.7. As it so happens, the current default on raspbian is 4.6, so just plain:
apt-get install gcc
Will do it. Check to make sure afterward with gcc --version
. You should see something like:
gcc (Debian 4.6.3-14+rpi1) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
armv6
, like the pi) on another (e.g.,x86
orx86_64
, like a normal PC). So if you are doing the compiling on the pi for the pi, don't use instructions intended for cross compiling! However, you might want to think seriously about it, because as mentioned, it takes quite a few hours to do the kernel right on the pi, and chances are you will screw it up the first few times, and if each time takes 4 hours...basically unless you are already familiar with the process, it is not very feasible. – goldilocks Apr 13 '14 at 19:53