Deepin使用python setup.py install 出现 error: command 'x86_64-linux-gnu-g...
Tofloor
poster avatar
jianxin223
deepin
2020-03-23 16:17
Author
求助,我今天想通过sudo -H python setup.py install来安装ueberzug,结果出现error: command 'x86_64-linux-gnu-gcc' failed with exit status 1,尝试过的方法如下:
  1. sudo apt-get install build-essential python3-dev libssl-dev libffi-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev
  2. sudo apt install libssl-dev
  3. sudo apt install python-dev
  4. sudo apt install python3-dev
  5. sudo apt install python3.6-dev
Copy the Code
结果都没有解决问题,我已经查阅了Deepin论坛,谷歌也谷歌了,可是就是没有解决,日志如下:
  1. jianxin@jianxin:~/Downloads/ueberzug-master
  2. $ > sudo -H python setup.py install                                              03/23/20 -  8:13 上午
  3. running install
  4. running bdist_egg
  5. running egg_info
  6. writing requirements to ueberzug.egg-info/requires.txt
  7. writing ueberzug.egg-info/PKG-INFO
  8. writing top-level names to ueberzug.egg-info/top_level.txt
  9. writing dependency_links to ueberzug.egg-info/dependency_links.txt
  10. writing entry points to ueberzug.egg-info/entry_points.txt
  11. reading manifest file 'ueberzug.egg-info/SOURCES.txt'
  12. reading manifest template 'MANIFEST.in'
  13. writing manifest file 'ueberzug.egg-info/SOURCES.txt'
  14. installing library code to build/bdist.linux-x86_64/egg
  15. running install_lib
  16. running build_py
  17. running build_ext
  18. building 'Xshm' extension
  19. x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-jgBwco/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c Xshm/Xshm.c -o build/temp.linux-x86_64-2.7/Xshm/Xshm.o
  20. Xshm/Xshm.c:43:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  21. init_display() {
  22. ^~~~~~~~~~~~
  23. Xshm/Xshm.c:303:8: error: unknown type name ‘PyModuleDef’
  24. static PyModuleDef module = {
  25.         ^~~~~~~~~~~
  26. Xshm/Xshm.c:304:5: error: ‘PyModuleDef_HEAD_INIT’ undeclared here (not in a function); did you mean ‘PyObject_HEAD_INIT’?
  27.      PyModuleDef_HEAD_INIT,
  28.      ^~~~~~~~~~~~~~~~~~~~~
  29.      PyObject_HEAD_INIT
  30. Xshm/Xshm.c:305:5: error: field name not in record or union initializer
  31.      .m_name = "Xshm",
  32.      ^
  33. Xshm/Xshm.c:305:5: note: (near initialization for ‘module’)
  34. Xshm/Xshm.c:305:15: warning: excess elements in scalar initializer
  35.      .m_name = "Xshm",
  36.                ^~~~~~
  37. Xshm/Xshm.c:305:15: note: (near initialization for ‘module’)
  38. Xshm/Xshm.c:306:5: error: field name not in record or union initializer
  39.      .m_doc = "Modul which implements the interaction with the Xshm extension.",
  40.      ^
  41. Xshm/Xshm.c:306:5: note: (near initialization for ‘module’)
  42. Xshm/Xshm.c:306:14: warning: excess elements in scalar initializer
  43.      .m_doc = "Modul which implements the interaction with the Xshm extension.",
  44.               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. Xshm/Xshm.c:306:14: note: (near initialization for ‘module’)
  46. Xshm/Xshm.c:307:5: error: field name not in record or union initializer
  47.      .m_size = -1,
  48.      ^
  49. Xshm/Xshm.c:307:5: note: (near initialization for ‘module’)
  50. Xshm/Xshm.c:307:15: warning: excess elements in scalar initializer
  51.      .m_size = -1,
  52.                ^
  53. Xshm/Xshm.c:307:15: note: (near initialization for ‘module’)
  54. Xshm/Xshm.c: In function ‘PyInit_Xshm’:
  55. Xshm/Xshm.c:314:16: warning: ‘return’ with a value, in function returning void
  56.          return NULL;
  57.                 ^~~~
  58. Xshm/Xshm.c:311:1: note: declared here
  59. PyInit_Xshm(void) {
  60. ^~~~~~~~~~~
  61. Xshm/Xshm.c:316:23: warning: implicit declaration of function ‘PyModule_Create’; did you mean ‘_PyModule_Clear’? [-Wimplicit-function-declaration]
  62.      module_instance = PyModule_Create(&module);
  63.                        ^~~~~~~~~~~~~~~
  64.                        _PyModule_Clear
  65. Xshm/Xshm.c:316:21: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  66.      module_instance = PyModule_Create(&module);
  67.                      ^
  68. Xshm/Xshm.c:318:16: warning: ‘return’ with a value, in function returning void
  69.          return NULL;
  70.                 ^~~~
  71. Xshm/Xshm.c:311:1: note: declared here
  72. PyInit_Xshm(void) {
  73. ^~~~~~~~~~~
  74. Xshm/Xshm.c:322:12: warning: ‘return’ with a value, in function returning void
  75.      return module_instance;
  76.             ^~~~~~~~~~~~~~~
  77. Xshm/Xshm.c:311:1: note: declared here
  78. PyInit_Xshm(void) {
  79. ^~~~~~~~~~~
  80. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Copy the Code

Reply Favorite View the author
All Replies
avatar
jianxin223
deepin
2020-03-23 16:18
#1
哪位大佬能够帮我解决问题,万分感谢!!!
Reply View the author
avatar
felixonmars
deepin
2020-03-23 16:34
#2
看起来这项目需要 Python 3。试试:
  1. sudo -H python3 setup.py install
Copy the Code
Reply View the author
avatar
jianxin223
deepin
2020-03-23 16:40
#3
https://bbs.deepin.org/post/189965
看起来这项目需要 Python 3。试试:

成功了,可能是我之前安装python3把python2的依赖挤掉了,谢谢大佬!!
Reply View the author
avatar
is******fo@gmail.com
deepin
2023-02-24 04:38
#4

Would go a little towards the main topic as per my assignments were done by the experts who have assisted me with a number of projects. Topics like nursing assignment help were given due importance and covered alongwith some major areas.

Reply View the author