2015-10-26 29 views
-1

我特林在泊塢窗容器使用pygame的(我希望得到從容器中顯示),當出現以下錯誤:在泊塢窗容器「(pygame的降落傘)段錯誤」

Fatal Python error: (pygame parachute) Segmentation Fault 

重現:

  1. 泊塢安裝
  2. 搬運工運行 - 它-e DISPLAY -w/pygame_hello_world buxx/pygame_hello_world /usr/bin/python3.4 hello_world.py
012 (對我來說)

結果是:

Fatal Python error: (pygame parachute) Segmentation Fault 

Current thread 0x00007f465f894740 (most recent call first): 
    File "hello_world.py", line 7 in <module> 

碼頭工人形象here可以查看hello_world.py內容here

如果你運行docker run -it -w /pygame_hello_world buxx/pygame_hello_world /usr/bin/python3.4 hello_world.py命令(沒有-e DISPLAY選項),你可以看到pygame工作顯示caca

會發生什麼?如何解決它?

+0

你並不孤單,我也得到'致命的Python錯誤:(pygame的降落傘)分段錯誤 當前線程0x00007f47c673c740(最近一次調用第一)您的圖像,我的碼頭版本1.9.0-rc2 – user2915097

回答

1

與合作:

docker run -w /pygame_hello_world -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/snd:/dev/snd --privileged -e DISPLAY buxx/pygame_hello_world python3.4 hello_world.py 

必須讓泊塢窗用戶與xhost +local:docker與X會話交流。

靈感來自this。建成後 文件「hello_world.py」,7號線在 `:

+0

我在編譯C擴展名爲PHP時遇到了此分段錯誤問題。有任何想法嗎? – MrMesees