0

I'm a new enthusiast trying to learn with raspberry pi so I apologize if I don't use the correct programming terms...

The problem that i'm having at the moment is that when I try pip install rpi-gpio i get the following error:

unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /var/working/venv/bin/python2 -c "import setuptools, tokenize;__file__='/tmp/pip-build-7BUUIX/rpi.gpio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-x_nNzV record/install-record.txt --single-version-externally-managed --compile --install-headers /var/working/venv/include/site/python2.7 failed with error code 1 in /tmp/pip-build-7BUUIX/rpi.gpio
Storing debug log for failure in /root/.pip/pip.log
-------------------------------------------------

I'm using minibian as the operative system, I have already installed apt-get install python2.7-dev

I'm on a Pi3

EDIT_01: I have tried to apt-get install gcc-arm-linux-gnueabihf and I get this error: E: Unable to locate package gcc-arm-linux-gnueabihf

enter image description here

EDIT_02: I tried manual installation of RPi.GPIO and I'm getting an error when I try to run sudo python RPi.GPIO-0.6.3/setup.py

ERROR

    sudo python RPi.GPIO-0.6.3/setup.py Traceback (most recent call last): 
File "RPi.GPIO-0.6.3/setup.py", line 40, in <module> 
long_description = open('README.txt').read() + open('CHANGELOG.txt').read(), IOError: [Errno 2] No such file or directory: 'README.txt''

It somehow doesn't find the README.txt file but I checked and It was succesfully extracted from the download.

enter image description here

  • Welcome to Raspberry Pi! Please take the tour and visit the helpcenter to see how things work here. – Ghanima Sep 22 '17 at 16:32
  • You've got three answers and some suggestions. Did you find a solution to your problem? – Ingo Jul 21 '18 at 19:57
0

Try :

sudo apt-get install gcc-arm-linux-gnueabihf
sudo apt-get install python-dev python3-dev
sudo pip install rpi-gpio

Edit1: Just noticed your using minibian - what is the reason for this ?

Edit2: Added 'install gcc...'

  • hey thanks for replying! I'm using minibian because i'm following a very basic tutorial I found online that uses this operative system... basically they told me to install minibian and I did it without questioning anything. I just tried your suggestion and I'm still getting the same error. what is the meaning of unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1? – fedezorrozuag Sep 22 '17 at 17:47
  • Its trying to use a c compiler which it can't find. Can you post a link to the tutorial your following. I would always recommend the Raspbian operating system to new users. – CoderMike Sep 22 '17 at 18:24
  • Edited my answer - this is a guess ! – CoderMike Sep 22 '17 at 18:48
  • Thanks for your help, I appreciate it! Here is the link: udemy.com/rpi-full-stack As soon as I arrive home I will try it out, thank you! – fedezorrozuag Sep 22 '17 at 21:55
  • 1
    I tried sudo apt-get install gcc-arm-linux-gnueabihf and I'm getting this error: E: Unable to locate package gcc-arm-linux-gnueabihf – fedezorrozuag Sep 24 '17 at 1:52
0

May manual installation work for you. You have to follow steps shown below.

Step-1:Download the library

wget https://pypi.python.org/packages/e2/58/6e1b775606da6439fa3fd1550e7f714ac62aa75e162eed29dbec684ecb3e/RPi.GPIO-0.6.3.tar.gz

step-2: Extract the archive to new directory

tar -xvf RPi.GPIO-0.6.3.tar.gz

Step-3: Browse to the new directory

cd RPi.GPIO-0.6.3

Step-4: Install the library

sudo python3 setup.py install

Step-5: Remove the directory and archive file

cd ~ 
sudo rm -rf RPi.GPIO-0.*

Note: You should take care about step-2 and step-3. Since I have no idea about the tar.gz file gets downloaded into which directory.

  • Hey, thanks for the alternative. Somehow I managed to do everything you suggested but I'm getting an error on STEP 4: root@intemperie:~/RPI_GPIO# sudo python RPi.GPIO-0.6.3/setup.py Traceback (most recent call last): File "RPi.GPIO-0.6.3/setup.py", line 40, in <module> long_description = open('README.txt').read() + open('CHANGELOG.txt').read(), IOError: [Errno 2] No such file or directory: 'README.txt'' ' – fedezorrozuag Sep 24 '17 at 18:01
  • Read the INSTALL.txt file on the tar archive.Definitely you will get some idea about installing RPi.GPIO. You can try step-4 edited above. Also you can try $ sudo pip install RPi.GPIO instead $ sudo pip install rpi.gpio – Arun K S Sep 25 '17 at 1:15
  • @fedezorrozuag I checked your edit and screenshot on the question now. You are tried to install(using step-4) immediately after extracting tar file(on step-2). This won't work and Pi will verbose like "There os no such file or directory". Since you are missed step-3 you got above error. You have to now browse to RPi.GPIO_0.6.3 directory using cd command and perform step-4 and step-5. Or you can start from step-1 after deleting tar.gz file and corresponding archive from the directory you are currently working. – Arun K S Sep 25 '17 at 1:50
0

In one of your replies to others, you mentioned you are using minibian.

Originally you have the error

unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

and you tried unsuccessfully to

apt-get install gcc-arm-linux-gnueabihf

but the package could not be located.

Do this after you ssh into your minibian

apt-get update

apt-get install build-essential

then go to wherever your working directory is and start your virtual environment

cd /var/working

. venv/bin/activate

and try again with the rpi.gpio install and it should now work for you, as it did for me.

pip install rpi.gpio

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.