mraa icon indicating copy to clipboard operation
mraa copied to clipboard

Errors while installing on Raspberry Pi

Open gitlucky96 opened this issue 6 years ago • 6 comments

I am trying to install mraa on a Raspberry Pi using the command line sudo add-apt-repository ppa:mraa/mraa

However, I am getting an error saying that there is no version for Raspbian, even though the Raspberry Pi seems to be supported (acc. to Documentation).

Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 95, in <module> sp = SoftwareProperties(options=options) File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__ self.reload_sourceslist() File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist self.distro.get_sources(self.sourceslist) File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources (self.id, self.codename)) aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch

What am I doing wrong? Can someone help me here?

gitlucky96 avatar Nov 03 '18 20:11 gitlucky96

As you can see in the README, the add-apt-repository is used on Ubuntu, but you're running Raspbian and quick googling shows that's not supposed to work there.

You can add that PPA manually though, see e.g. here for a recipe.

alext-mkrs avatar Nov 04 '18 09:11 alext-mkrs

Thanks! I was able to install it after installing dirmngr (with sudo apt-get install dirmngr). However, my c++ files don't seem to be able to use the library. Is there a way I can check if it is installed properly? And can I just include the mraa library with a #include directive in c++?

Thanks for your answers. I appreciate it!

gitlucky96 avatar Nov 04 '18 22:11 gitlucky96

No worries.

If you could elaborate on how exactly

my c++ files don't seem to be able to use the library

I should be able to advise. Generally there are examples packaged, so you could try those first.

alext-mkrs avatar Nov 15 '18 20:11 alext-mkrs

As you can see in the README, the add-apt-repository is used on Ubuntu, but you're running Raspbian and quick googling shows that's not supposed to work there.

You can add that PPA manually though, see e.g. here for a recipe.

I still cannot solve it using the methods provided from the link. When I try to install sudo apt-add-repository ppa:pj-assis/ppa

The error receives as below...

  File "/usr/bin/apt-add-repository", line 95, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch```

khinmaunghtay4ah avatar Mar 08 '19 17:03 khinmaunghtay4ah

Is there a solution found?

cschaf avatar Jun 28 '19 09:06 cschaf

Not exactly the answer to the question but if you are in a hurry and have an online translator (for my french pages) you can check the raspberryPi binary images I am trying to mainain for our project on meteorology and climate sciences, I deliver them with debian and compilation of mraa and upm among other goodies. http://mediaserv.climatetmeteo.fr/images/RaspBerry/ And if you have the sufficient skills you can follow my blog and compile it by yourself #digitalTransformation :-) https://blog.tremplin.ens-lyon.fr/GerardVidal/RaspberryPi-2_3BuildImage.html

g-vidal avatar Dec 09 '19 09:12 g-vidal