国产欧拉系统编译安装Python2.x,后无法启动gclusterd和gbased服务
问题描述:
国产欧拉系统编译安装Python2,后无法启动gcluster服务,启动 gcluster 时候报错:
Can't open shared library 'libpyudf.so' (errno: 0 /data/192.168.104.9/gcluster/server/lib/gbase/plugin/libpyudf.so: undefined symbol: PyUnicodeUCS4_AsUTF8String)
问题原因:
1、原因是 python 的unicode 和动态库的不一致导致
2、第一次编译python 2 时候没有加 --enable-unicode=ucs4 导致 启动gcluster和gbase服务报错,所以重新编译的时候 一定添加--enable-unicode=ucs4 参数
处理方法:
重新编译python2.x 步骤:
1、cd python-2.7.18
2、执行 ./configure --enable-shared --prefix=/usr/local/python-2.7.18 --enable-unicode=ucs4 && make -j 8 && make install
3、ln -s /usr/local/python-2.7.18/bin/python /usr/bin/python
4、 设置库环境变量
echo /usr/local/python-2.7.18/lib > /etc/ld.so.conf.d/py2.conf
ldconfig
备注:重新编译的时候 一定添加--enable-unicode=ucs4 参数
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25044
- 42023-09-25浏览数:18519
- 52020-05-11浏览数:17526