原 编译安装php报错xz_decomp,包版本不匹配导致
现象
在openEuler 22.03 (LTS-SP3)上编译安装php7.4,结果在make阶段报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_decomp': (.text+0x637): undefined reference to `lzma_code' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_make': (.text+0xb3f): undefined reference to `lzma_auto_decoder' /usr/bin/ld: (.text+0xca7): undefined reference to `lzma_properties_decode' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `__libxml2_xzclose': (.text+0x1715): undefined reference to `lzma_end' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_decomp': (.text+0x637): undefined reference to `lzma_code' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_make': (.text+0xb3f): undefined reference to `lzma_auto_decoder' /usr/bin/ld: (.text+0xca7): undefined reference to `lzma_properties_decode' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `__libxml2_xzclose': (.text+0x1715): undefined reference to `lzma_end' collect2: error: ld returned 1 exit status make: *** [Makefile:291: sapi/cli/php] Error 1 make: *** Waiting for unfinished jobs.... collect2: error: ld returned 1 exit status make: *** [Makefile:372: sapi/cgi/php-cgi] Error 1 /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_decomp': (.text+0x637): undefined reference to `lzma_code' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_make': (.text+0xb3f): undefined reference to `lzma_auto_decoder' /usr/bin/ld: (.text+0xca7): undefined reference to `lzma_properties_decode' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `__libxml2_xzclose': (.text+0x1715): undefined reference to `lzma_end' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_decomp': (.text+0x637): undefined reference to `lzma_code' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `xz_make': (.text+0xb3f): undefined reference to `lzma_auto_decoder' /usr/bin/ld: (.text+0xca7): undefined reference to `lzma_properties_decode' /usr/bin/ld: /usr/lib64/libxml2.a(xzlib.o): in function `__libxml2_xzclose': (.text+0x1715): undefined reference to `lzma_end' collect2: error: ld returned 1 exit status make: *** [Makefile:336: sapi/phpdbg/phpdbg] Error 1 collect2: error: ld returned 1 exit status make: *** [Makefile:303: sapi/fpm/php-fpm] Error 1 |
原因
如下3个包,需要使用sp3的包,否则会报错:


