%20%EC%B0%BD%EC%9D%B4%20%EC%96%B4%EB%96%A4%20%EC%9D%B4%EC%9C%A0%EB%A1%9C%EB%93%A0%20%ED%91%9C%EC%8B%9C%EB%90%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
아이콘을 클릭하여 시작할 때마다 software and updates
프로그램이 시작되었다가 중지됩니다. 명령줄에서 실행하려고 해도 같은 일이 발생합니다.
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gdk, Gtk, Gio, GLib
/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import GObject, Gdk, Gtk, Gio, GLib
명령이 오류( echo $?
) 없이 종료되기 때문에 이 동작은 이상합니다. 또 무엇이 이렇게 실패하게 만들 수 있을까요?
이상하게도 루트( )로 실행하면 gksu software-properties-gtk
잘 작동합니다.
답변1
문제는 내가 사용자로 설치한 Python 버전에 이 프로그램을 실행하는 데 필요한 gtk 라이브러리가 포함되어 있지 않다는 것입니다.
루트로 실행했을 때 모든 라이브러리가 이미 내장되어 있는 시스템의 Python 설치를 사용하고 있었기 때문에 자연스럽게 작동했습니다.
software-properties-gtk
이 문제는 프로그램 상단의 shebang 줄에 다음과 같이 표시되므로 이후 버전에서 수정되었습니다 .
#!/usr/bin/python3
대신에 #!/usr/bin/env python3
.
후자는 사용자 자신의 python3 버전을 사용하게 하는 반면, 전자(현재 사실상)는 시스템에 설치된 python3 버전을 사용합니다.