1. librdkafka无法编译安装,报错:c++
系统基础环境不全,重新安装了:
libstdc++-7.3.0-20190804.35.p02.ky10.aarch64.rpm libstdc++-devel-7.3.0-20190804.35.p02.ky10.aarch64.rpm gcc-c++-7.3.0-20190804.35.p02.ky10.aarch64.rpm或者 yum安装 gcc-c++
编译成功。
2. librdkafka明明编译成功了,但是python中引入confluents_kafka 依然报 ImportError: librdkafka.so.1: cannot open shared object file: No such file or directory
执行的安装命令是:./configure && make && make install 这样默认的安装路径是/usr/local/lib下,所以在linux的默认共享路径/lib和/usr/lib下找不到。因此添加的library如果不再/lib和/usr/lib里的话,就需要将/usr/local/lib添加到library所在的路径,然后重新调用ldconfig命令即可。
echo "/usr/local/lib" >> /etc/ld.so.conf ldconfig3. yisacommon安装时报错 pgsql相关问题
Error: pg_config executable not found. Please add the directory containing pg_config to the PATH or specify the full executable path with the option: python setup.py build_ext ...psycopg2安装时报错 缺少系统依赖,重新安装: postgresql-10.5.19.p01.ky10.aarch64.rpm postgresql-devel-10.5.19.p01.ky10.aarch64.rpm python3-devel-3.7.9-6.ky10.aarch64.rpm4. 执行ldconfig提示 /usr/lib64/libllvm-7.so is not a symbolic link 警告
因为libllvm-7.so正常情况下应该是一个符号链接,而不是实体文集件,修改其为符号链接即可
ln -s /usr/lib64/libffi.so.7.1.0 /usr/lib64/libffi.so.75. 发版带的message_resource安装前切记把python3.10的安装去掉,手动安装python3.10 不要覆盖掉系统自带的python3
原因:发版的python3.10 缺少系统必要的依赖,会导致firewall-cmd 和 yum 等命令失效
6. python3.10 调用 金仓数据库
import ksycopg2
可以从金仓部署包中的Interface中找对应的依赖包,解压后放到python3.10安装目录下的site-packages下。
建议使用pgsql的 psycopg2
原因:
使用RealDictCursor能返回字典格式[{key:value},...]。
金仓自带的 ksycopg2 中的RealDictCursor是[(key,value),...] 格式
7. python2.7 下 安装librdkafka 报错 sasl/sasl.h: No such file or directory
yum -y install cyrus-sasl cyrus-sasl-devel cyrus-sasl-lib8. python2.7下引入ksycopg2 报错 ImportError: libkci.so.5: cannot open shared object file: No such file or directory
libkci.so.5库未加载,
如果是本机,可以修改/etc/ld.so.conf 配置文件。将人大金仓安装目录下的Server/lib 添加到ld.so.conf中,再执行ldconfig。
如果不是本机,那么可以将Server/lib下的libkci.so.5.12导入到服务器/usr/local/lib下,并将/usr/local/lib目录添加到ld.so.conf 执行ldconfig
9. python3.10下的confluent_kafka可能有问题 未解决。
可能是python环境混乱或者confluent_kafka版本问题导致
生产数据时报错 PY_SSIZE_T_CLEAN will be required for '#' formats
10. 金仓数据表导入问题
mysql 表导入到 金仓,对于自增字段问题
1. 金仓中需要先创建自增序列:
create sequence id_seq ;
2. 给表的主键id指定序列名称
alter table table alter column id set default nextval('id_seq');