Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.8 failed to compile Module _uuid

Compiling the recent version of Python 3.8, the UUID module failed with this following error:

/home/centos/Python-3.8.0/Modules/_uuidmodule.c: In function ‘py_uuid_generate_time_safe’:
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:19:5: error: unknown type name ‘uuid_t’
     uuid_t uuid;
     ^
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:36:5: error: implicit declaration of function ‘uuid_generate_time’ [-Werror=implicit-function-declaration]
     uuid_generate_time(uuid);
     ^
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:37:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     return Py_BuildValue("y#O", (const char *) uuid, sizeof(uuid), Py_None);
                                 ^
cc1: some warnings being treated as errors

I installed all relevant packages without any issue.

like image 253
Herve Meftah Avatar asked Nov 05 '19 10:11

Herve Meftah


1 Answers

please install lzma devel lib and uuid devel lib. uuid was linked to this lib. sudo apt-get install uuid-dev lzma-dev liblzma-dev

didn't install:

_uuid build failed

after sudo apt-get install uuid-dev lzma-dev liblzma-dev install:

_uuid _lzma is ok

like image 183
RYefccd Avatar answered Oct 13 '22 08:10

RYefccd