MIT: http://mattn.mit-license.org/2011
步骤1,2,3同上 oci和oci sdk 下载地址:http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html (下载instantclient-basic和instantclient-sdk) 下载完成后,输入如下命令
cd <instanclient path>
mv libclntsh.dylib.* libclntsh.dylib
ln <instanclient path>/libclntsh.dylib /usr/lib/libclntsh.dylib
ln <instanclient path>/libocci.dylib.* /usr/lib/libocci.dylib.*
ln <instanclient path>/libociei.dylib /usr/lib/libociei.dylib
ln <instanclient path>/libnnz11.dylib /usr/lib/libnnz11.dylib
修改oci8.pc文件
prefix=D:\GoOracleEnv\instantclient_19_3
exec_prefix=D:\GoOracleEnv\instantclient_19_3
libdir=${prefix}
includedir=${prefix}/sdk/include/
Name: OCI
Description: Oracle database engine
Version: 11.2
Libs: -L${libdir} -lclntsh
Libs.private:
Cflags: -I${includedir}
由于osx 上默认是没有pkg-config工具的需要手动安装一下
sudo brew install pkg-config
export PKG_COFNIG_PATH="/usr/lib/pkgconfig"
以上完成后 go get github.com/Kylelkh/go-oci8 就可以了
待写