java.lang.UnsatisfiedLinkError:/opt/oracle/oraloader-2.0.0-2/lib/libolh11.so:libclntsh.so.11.1:无法打开共享对象文件

时间:2012-12-11 12:57:41

标签: linux oracle hadoop classpath hdfs

在群集上运行hadoop作业时,我得到以下内容。

2012-12-11 04:20:47,642 INFO oracle.hadoop.loader.lib.output.OCIOutputFormat: loadNativeLib: java.library.path=/opt/oracle/oraloader-2.0.0-2/lib:/usr/lib/hadoop-0.20-mapreduce/lib/native/Linux-amd64-64:/u04/hadoop/mapred/taskTracker/ashsshar/jobcache/job_201212110407_0004/attempt_201212110407_0004_r_000000_0/work
2012-12-11 04:20:47,657 INFO org.apache.hadoop.mapred.TaskLogsTruncater: Initializing logs' truncater with mapRetainSize=-1 and reduceRetainSize=-1
2012-12-11 04:20:47,661 FATAL org.apache.hadoop.mapred.Child: Error running child : java.lang.UnsatisfiedLinkError: /opt/oracle/oraloader-2.0.0-2/lib/libolh11.so: libclntsh.so.11.1: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)

我已经检查过这些文件存在于群集节点的必需目录下。我也更改了这些文件的权限。

我在hadoop的mapred-site.xml中修改了LD_LIBRARY_PATH,使用mapred.child.java.opts选项添加这些必需的第三方jar

1 个答案:

答案 0 :(得分:1)

要使java库加载器找到库,您应该设置JAVA_LIBRARY_PATH