4

Background: I have been able to build and run ROS kinetic and ROS2 eloquent containers in my Raspberry Pi4 in the past.

I am trying to build and run ROS noetic. However I am getting an error. To show this I do the most simple things

docker pull ros:noetic

then I do

docker image ls

and I can see that the image is there

but when I do

docker run -it ros:noetic

I get

Fatal Python error: pyinit_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0xb6ff1460 (most recent call first):
<no Python frame>

I wonder what is happening and how to solve this

My suspicion is that since noetic is using Python 3 and not 2, something is failing due to versions

Comments: I know that ROS kinetic uses python 2 but I assumed ROS2 eloquent used Python 3! Now I found that it uses python 2 too!

MORE Information:

I have been able to build and run ROS noetic containers in my Ubuntu desktop machine. So I imagine it is a raspberry pi problem. However it seems that it is possible to install noetic natively on RPi, so I wonder if it is a problem with the Noetic Docker image...

KansaiRobot
  • 7,564
  • 11
  • 71
  • 150

3 Answers3

7

I had the exact same issue and the following workaround worked:

docker run --privileged

Docker documentation on --privileged switch

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
tbaxx
  • 79
  • 1
  • this removes any notion of security from running in a container. Use the answer above about upgrading libseccomp2 – jerm Jul 18 '21 at 04:51
3

Next commands on host machine, helped me out:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install -t buster-backports libseccomp2 
Taras Vaskiv
  • 2,215
  • 1
  • 18
  • 17
  • 1
    This did the trick for me as well. But could you please write 2-3 lines what this exactly does and why it fixes the permissions :) ? – TheClockTwister Aug 17 '21 at 20:48
0

It's not a docker issue, since it works if you do that in another machine. It's an issue related to how it get time.

Maybe it can helps you:

Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: 65001

Alejandro Galera
  • 3,445
  • 3
  • 24
  • 42