2

尝试安装 go-oci8 时出现此错误。

bueno@felipe-cb:~/devel/go/src/github.com/mattn/go-oci8$ go get github.com/mattn/go-oci8
# github.com/mattn/go-oci8
gcc: warning: '-x c' after last input file has no effect
gcc: fatal error: no input files
compilation terminated.

可能有帮助的信息:

海合会版本:

bueno@felipe-cb:~/devel/go/src/github.com/mattn/go-oci8$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5) 

甲骨文主页:

bueno@felipe-cb:~/devel/go/src/github.com/mattn/go-oci8$ ls -la $ORACLE_HOME
total 16
drwxr-xr-x 4 root root 4096 Fev 21 12:50 .
drwxr-xr-x 3 root root 4096 Jan 21 07:07 ..
drwxr-xr-x 2 root root 4096 Jan 21 07:07 bin
lrwxrwxrwx 1 root root   33 Fev 21 12:50 include -> /usr/include/oracle/12.1/client64
drwxr-xr-x 2 root root 4096 Jan 21 07:07 lib

包括目录:

bueno@felipe-cb:/usr/lib/oracle/12.1/client64/include$ cd $ORACLE_HOME/include 
bueno@felipe-cb:/usr/lib/oracle/12.1/client64/include$ ls -la
total 1676
drwxr-xr-x 2 root root   4096 Jan 21 07:07 .
drwxr-xr-x 3 root root   4096 Jan 21 07:07 ..
...
-rw-r--r-- 1 root root 188312 Mai 24  2013 oci.h
...

库目录:

bueno@felipe-cb:/usr/lib/oracle/12.1/client64/include$ cd $ORACLE_HOME/lib
bueno@felipe-cb:/usr/lib/oracle/12.1/client64/lib$ ls -la
total 212884
...
lrwxrwxrwx 1 root root        17 Jan 21 07:07 libclntsh.so -> libclntsh.so.12.1
-rw-r--r-- 1 root root  55453863 Mai 24  2013 libclntsh.so.12.1
...

有谁知道如何解决这个问题?

提前致谢!

更新:Github 上的问题链接 - https://github.com/mattn/go-oci8/issues/19

2月24日更新:

bueno@felipe-cb:~$ go version
go version go1.2 linux/amd64
4

0 回答 0