项目要用oracle , Windows的 OciLib 好弄, 今天安装到linux下 ,编译老是出错,最后几行如下:

checking for OCILIB install path... /usr/local
ls: cannot access *.html: No such file or directory
ls: cannot access *.css: No such file or directory
ls: cannot access *.png: No such file or directory
checking for OCILIB version... v4.2.1
checking for OCILIB options... import: linkage, charset = ansi
checking for Oracle home... defined by environment :
checking for Oracle OCI headers location... configure: error: variable not set or unable to guess

然后搜索 configure文件,最终发现是 oracle oci 的头文件的文件夹没找到;

然后到oracle官网下载 instantclient-sdk-linux 又是一阵折腾,不知道他抽什么疯,死活不能下载, 下载页点击跳转就到错误页了~~~

后来网上找了个下载,还好,能用(文件大小只有625KB), 地址:http://download.csdn.net/detail/lsxy117/5118691

但是下载解压后 configure 文件里的路径居然没有include文件夹的配置,尼玛,自己写了(约第12775行处):

      # find out the Oracle public OCI headers path
if test "$ac_headers_path" = NO; then
if test "$ac_oracle_home" != NO; then
test_include_path=$ac_oracle_home/rdbms/public
if test -d "$test_include_path"; then
ac_headers_path=$test_include_path
else
test_include_path=$ac_oracle_home/rdbms/demo
if test -d "$test_include_path"; then
ac_headers_path=$test_include_path
else
echo "line 12775 ,lzpong add this ac_headers_path to $ac_oracle_home/include , need to download instantclient-sdk-linux-xx.xx.xx.zip to get includes file!!!!"
ac_headers_path=$ac_oracle_home/include
fi
fi
fi
fi

因为我是直接把sdk的include文件夹解压到 /usr/local/instantclient_12_1 的,所以 直接写了:

ac_headers_path=$ac_oracle_home/include

然后要配置 环境变量的!!!

根据这里(http://ljhzzyx.blog.163.com/blog/static/3838031220107139322436/)配置了,没重新登录 没起作用, 于是直接执行了下:

export ORACLE_HOME=/usr/local/instantclient_12_1

export PATH=$ORACLE_HOME:$PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME

export TNS_ADMIN=$ORACLE_HOME/network/admin

export NLS_LANG="Simplified Chinese_china".ZHS16GBK

./configure

make

make install

至此, 已经安装好了 ^_^, 没有出错哦,

lib文件在 /usr/local/lib

头文件在 /usr/local/include

好了,可以使用 OciLib 4.2.1 了 ;

也可以查看他的 readme 文件, 可以搭配一些参数make install

Website : http://www.ocilib.net

GitHub : https://github.com/vrogier/ocilib

PS:不过这个库貌似是编译的 32位的, 如如何编译64位的, 请知道的同学告知我, 谢谢!

CentOS 安装OciLib 4.2.1 (Linux)的更多相关文章

  1. CentOS 安装 Mongodb详解 --- 无Linux基础

    先去官方下载离线安装包:https://www.mongodb.com/ ftp连接一下服务器,把离线包上传上去 XShell连接一下: 解压文件(你输一点就可以按tab键,它会自动补全):tar - ...

  2. CentOS 安装 Mongodb详解 --- 有Linux基础

    安装包:https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.4.1.tgz 安装过程 安装pstree小工具,以及其使用 关闭 ...

  3. CentOS安装maven3.2.2(Linux系列适用)

    首先,下载最新的maven3.2.2,地址:http://mirrors.cnnic.cn/apache/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2 ...

  4. centos安装redis及php-redis扩展

    centos安装redis及php-redis扩展  Linux, WEB 七162012 今天公司同事要求在测试机上安装redis,并且要求让php安装上redis的扩展,redis是一个key-v ...

  5. 阿里云服务器Linux CentOS安装配置(零)目录

    阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...

  6. 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署

    阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...

  7. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

  8. 阿里云服务器Linux CentOS安装配置(七)域名解析

    阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...

  9. 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署

    阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...

随机推荐

  1. Bringing Whoops Back to Laravel 5

    You might be missing the "prettier" Whoops error handler from Laravel 4. If so, here's how ...

  2. 80 端口被占用 pid=4

    80端口被pid=4的系统进程给占用的解决方法: 一般开发的时候我们都会安装sqlserver ,也会把Sql server Reporting Services 安装上去.原因就是这个服务占用了80 ...

  3. Hive安装配置指北(含Hive Metastore详解)

    个人主页: http://www.linbingdong.com 本文介绍Hive安装配置的整个过程,包括MySQL.Hive及Metastore的安装配置,并分析了Metastore三种配置方式的区 ...

  4. C#多线程之线程同步篇2

    在上一篇C#多线程之线程同步篇1中,我们主要学习了执行基本的原子操作.使用Mutex构造以及SemaphoreSlim构造,在这一篇中我们主要学习如何使用AutoResetEvent构造.Manual ...

  5. Hawk 6. 编译和扩展开发

    Hawk是开源项目,因此任何人都可以为其贡献代码.作者也非常欢迎使用者能够扩展出更有用的插件. 编译 编译需要Visual Stuido,版本建议使用2015, 2010及以上没有经过测试,但应该可以 ...

  6. Paypal开发中遇到请求被中止: 未能创建 SSL/TLS 安全通道及解决方案

    最近在基于ASP.NET上开发了Paypal支付平台,在ASP.NET开发的过程中没有遇到这个问题,但是引用到MVC开发模式中的时候就出现了"未能创建 SSL/TLS 安全通道及解决方案&q ...

  7. jquery中的$(document).ready(function() {});

    当文档载入时执行function函数里的代码, 这部分代码主要声明,页面加载后 "监听事件" 的方法.例如: $(document).ready( $("a") ...

  8. 【从零开始学BPM,Day5】报表配置及自定义功能页面开发

    [课程主题] 主题:5天,一起从零开始学习BPM [课程形式] 1.为期5天的短任务学习 2.每天观看一个视频,视频学习时间自由安排. [第五天课程] 1.课程概要 Step 1 软件下载:H3 BP ...

  9. linux上使用google身份验证器(简版)

    系统:centos6.6 下载google身份验证包google-authenticator-master(其实只是一个.zip文件,在windwos下解压,然后传进linux) #cd /data/ ...

  10. ubuntu进行子域名爆破

    好记性不如烂笔头,此处记录一下,ubuntu进行子域名的爆破. 先记录一个在线的子域名爆破网址,无意中发现,很不错的网址,界面很干净,作者也很用心,很感谢. https://phpinfo.me/do ...