GBase 8a
安装配置
文章

国产欧拉系统编译安装Python2.x,后无法启动gclusterd和gbased服务

发表于2025-04-10 17:48:1451次浏览1个评论

问题描述:

国产欧拉系统编译安装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  参数

                                                                                                                                                                 

评论

登录后才可以发表评论
崔哥发表于 7个月前
春风试手先梅蕊,頩姿冷艳明沙水。不受众芳知,端须月与期。清香闲自远,先向钗头见。雪后燕瑶池,人间第一枝。