deepin系统docker安装opengauss 6.0.2 gsql、gs_restore报错

deepin系统docker安装的opengauss 6.0.2版本,但是使用gs_restore命令报错:

[root@c74d6287544f /]# /usr/local/opengauss/bin/gs_restore -h localhost -U gaussdb -d postgres /sql/pg_backup.sql
/usr/local/opengauss/bin/gs_restore: error while loading shared libraries: libcjson.so.1: cannot open shared object file: No such file or directory

使用gsql命令也报错:

[root@c74d6287544f /]# /usr/local/opengauss/bin/gsql -h localhost -U gaussdb -d postgres /sql/pg_backup.sql
/usr/local/opengauss/bin/gsql: error while loading shared libraries: libcjson.so.1: cannot open shared object file: No such file or directory

命令行没法用,怎么才能修复呢?

找到解决方案了:

将该目录加进动态链接配置中

echo ‘/usr/local/opengauss/lib’ | sudo tee -a /etc/ld.so.conf
ldconfig

执行上面两行命令即可