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

3 Answers3

1

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...'

CoderMike
  • 7,102
  • 1
  • 11
  • 16
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.

Arun
  • 261
  • 1
  • 10
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