Friday, August 5, 2016

/usr/bin/ld: cannot find -lclntsh during make of oracle_fdw

After you have unzipped the oracle_fdw-ORACLE_FDW_1_3_0.zip file and then run the make command in the oracle_fdw-ORACLE_FDW_1_3_0 directory, it gives the message: 

       /usr/bin/ld: cannot find -lclntsh
       collect2: ld returned 1 exit status
       make: *** [oracle_fdw.so] Error 1

You run the command: /usr/bin/ld -lclntsh --verbose 
It prints at the end of the messages:

      attempt to open /usr/x86_64-redhat-linux/lib64/libclntsh.so failed
      attempt to open /usr/x86_64-redhat-linux/lib64/libclntsh.a failed
      attempt to open /usr/local/lib64/libclntsh.so failed
      attempt to open /usr/local/lib64/libclntsh.a failed
      attempt to open /lib64/libclntsh.so failed
      attempt to open /lib64/libclntsh.a failed
      attempt to open /usr/lib64/libclntsh.so failed
      attempt to open /usr/lib64/libclntsh.a failed
      attempt to open /usr/x86_64-redhat-linux/lib/libclntsh.so failed
      attempt to open /usr/x86_64-redhat-linux/lib/libclntsh.a failed
      attempt to open /usr/lib64/libclntsh.so failed
      attempt to open /usr/lib64/libclntsh.a failed
      attempt to open /usr/local/lib/libclntsh.so failed
      attempt to open /usr/local/lib/libclntsh.a failed
      attempt to open /lib/libclntsh.so failed
      attempt to open /lib/libclntsh.a failed
      attempt to open /usr/lib/libclntsh.so failed
      attempt to open /usr/lib/libclntsh.a failed
      /usr/bin/ld: cannot find -lclntsh

To fix this, do the following.
   
      ln -s /usr/pgsql-9.5/oracle/instantclient_12_1/lib/libclntsh.so.12.1 /usr/lib/libclntsh.so

which makes a symbolic link libclntsh.so in the /usr/lib directory that points to the libclntsh.so.12.1 of the oracle instant client.

---------------------------------------------------------------------------------------------------

                        
If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.

No comments:

Post a Comment