linux下python安装
yum install gcc readline readline-devel sqlite sqlite-devel openssl openssl-devel gdbm gdbm-devel bzip2 bzip2-devel tkinter tkinter-devel tcl tcl-devel tk tk-devel
mkdir -p /usr/local/python/tmp
cd /usr/local/python/tmp
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz&&
tar zxvf Python-3.6.5.tgz
cd Python-3.6.5&&./configure --prefix=/usr/local/python/Python-3.6.5
make&&make install&&
ln -s /usr/local/python/Python-3.6.5/bin/python3.6 /usr/bin/python3&&
ln -s /usr/local/python/Python-3.6.5/bin/pip3.6 /usr/bin/pip3
调用python时报的错误:
cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://cx-oracle.
安装oracle客户端:
rpm -ivh oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
rpm -ivh oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm
[root@oracletest01 home]# find / -name client64
/usr/lib/oracle/12.2/client64
[root@oracletest01 home]# vim /etc/ld.so.conf
将/usr/lib/oracle/12.2/client64/lib加进去
[root@oracletest01 home]# more /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/lib/oracle/12.2/client64/lib
使配置生效:
[root@oracletest01 home]# ldconfig
rpm文件:
http://139.196.51.64:8090/upload/2020/08/oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64-02de20ba6048417fa3422365fbbbf7e5.rpm
http://139.196.51.64:8090/upload/2020/08/oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64-c51c4054146e4d5c86b0d01b3918dd07.rpm