[MonoDevelop] [SPAM] Re: [SPAM] How to set the Project References in Monodevelope IDE (System.DllNotFoundException: libclntsh.so )?

Hari phariparam at gmail.com
Tue May 6 21:36:18 UTC 2014


>
> Hi Eberhard,
>
> I have resolved the issue by doing the following
>
>


> echo $ORACLE_HOME/lib > /etc/ld.so.conf.d/dbconf.conf
>


> set the$ORACLE_HOME, $ORACLE_INCLUDE_PATH and $ORACLE_LIB_PATH to
> /etc/profile.d
>
> Because of some reason MonoDevelop IDE is not working if I use the OCI
Client Libraries.

Thanks for your help.


>
>  On Tue, May 6, 2014 at 3:17 PM, Hari <phariparam at gmail.com> wrote:
>
>> I have copied the libclntsh.so file to a directory and set the
>> LD_LIBRARY_PATH in* /etc/profile.d*.
>>  echo $LD_LIBRARY_PATH  is displying the newly set path.
>>
>> After this I can run the MonoDevelop IDE built binary using the mono
>>
>> ex: mono MyApp.exe. (This works)
>>
>>
>> But the monodevelop throwing the System.DllNotFoundException:
>> libclntsh.so exception . It looks like the Monodevelop IDE is trying to get
>> the run time dll from a different location.
>>
>> I also tried the following.
>>
>> Copied the libclntsh.so   in to /opt/mylib folder :
>>
>> 1.
>> *ls /opt/mylib/*        libclntsh.so  #
>>
>> *2.*
>> *echo /opt/mylib/ >/etc/ld.so.conf.d/mylib.conf*
>> 3. *ldconfig*
>>
>> 4.* ldconfig -p |grep libclntsh*
>>     libclntsh.so.11.1 (libc6,x86-64) => /opt/mylib/libclntsh.so.11.1
>>
>>
>> *5. ls /opt/mylib/*libclntsh.so  libclntsh.so.11.1
>>
>> *6. ls -ltr /opt/mylib/*
>> -rwxrwxrwx. 1 root root 48725713 May  6 11:31 libclntsh.so
>> lrwxrwxrwx. 1 root root       12 May  6 15:08 libclntsh.so.11.1 ->
>> libclntsh.so
>>
>>
>> I am wondering how can I remove the symbolic link and tell the compiler
>> to use the lib libclntsh.sh.
>>
>> Once again thanks for you help.
>>
>> Reagrds
>>
>>
>> On Tue, May 6, 2014 at 10:54 AM, Hari <phariparam at gmail.com> wrote:
>>
>>> Hi Eberhard,
>>>
>>> After the previous post, I have downloaded the OCI Client version 12.1
>>>
>>> ls -ltr
>>>
>>> rwxr-xr-x. 1 root root    114225 May  6 10:12 liboramysql12.so
>>> -r-xr-xr-x. 1 root root    330074 May  6 10:12 libons.so
>>> -r-xr-xr-x. 1 root root    152544 May  6 10:12 libocijdbc12.so
>>> -rw-r--r--. 1 root root       440 May  6 10:12 BASIC_README
>>> -rwxr-xr-x. 1 root root    219437 May  6 10:12 uidrvci
>>> -r--r--r--. 1 root root   3397734 May  6 10:12 ojdbc7.jar
>>> -rwxr-xr-x. 1 root root     43154 May  6 10:12 genezi
>>> -rwxr-xr-x. 1 root root     29396 May  6 10:12 adrci
>>> -rwxr-xr-x. 1 root root 136162781 May  6 10:12 libociei.so
>>> -rw-r--r--. 1 root root     71231 May  6 10:12 xstreams.jar
>>> -rwxr-xr-x. 1 root root   2523156 May  6 10:12 libocci.so.12.1
>>> -r-xr-xr-x. 1 root root   6277261 May  6 10:12 libnnz12.so
>>> -rwxr-xr-x. 1 root root  55453863 May  6 10:12 libclntsh.so.12.1
>>> -rwxr-xr-x. 1 root root   6750135 May  6 10:12 libclntshcore.so.12.1
>>> -r--r--r--. 1 root root   3389454 May  6 10:12 ojdbc6.jar
>>> -rwxr-xr-x. 1 root root  48725713 May  6 10:35 libclntsh.so
>>> lrwxrwxrwx. 1 root root        12 May  6 10:35 libclntsh.so.11.1 ->
>>> libclntsh.so
>>>
>>>
>>> The libclntsh.so file is in the $ORACLE_HOME/lib folder, I have copied
>>> this file to  /opt/instanceclient_12.
>>>
>>> 1. Deleted the previously configured ldconfig file from the
>>> ld.so.config.d directory.
>>> 2. Configured the ld.so.config.d file using the command
>>>    echo /opt/instantclient_12_1 >/etc/ld.so.conf.d/instantclient.conf
>>>
>>>  ldconfig -p |grep libcln
>>>  libclntshcore.so.12.1 (libc6,x86-64) =>
>>> /opt/instantclient_12_1/libclntshcore.so.12.1
>>>  libclntsh.so.12.1 (libc6,x86-64) =>
>>> /opt/instantclient_12_1/libclntsh.so.12.1
>>>  libclntsh.so.11.1 (libc6,x86-64) =>
>>> /opt/instantclient_12_1/libclntsh.so.11.1
>>>
>>> I will try to install the -dev version of the package .
>>>
>>> Thanks
>>>
>>>
>>> On Tue, May 6, 2014 at 10:20 AM, Eberhard Beilharz <eb1 at sil.org> wrote:
>>>
>>>>
>>>> Do you have *libclntsh.so  *or only *libclntsh.so.11.1*? You might
>>>> have to install the -dev version of the package (or manually create a
>>>> symbolic link from /opt/instantclient_11_2/libclntsh.so.11.1 to
>>>> /opt/instantclient_11_2/libclntsh.so).
>>>>
>>>>
>>>> Hari wrote on 2014-05-06 at 16:38 +0200:
>>>>
>>>> Hi Eberhard.
>>>>
>>>> Thanks for your valuable comments.  I have set the libclntsh.so.11.1
>>>> path as follows. But still I am getting the same error as mentioned
>>>> previoulsy.
>>>>
>>>> guest at orcllinux ~]$ ldconfig -p | grep libclntsh
>>>>  libclntsh.so.11.1 (libc6,x86-64) =>
>>>> /opt/instantclient_11_2/libclntsh.so.11.1
>>>>
>>>>
>>>> I also tried setting the libclntsh.so.11.1 path in /etc/profile.d. I
>>>> verified the LD_LIBRARY_PATH and it displayed the file path correctly.
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> On Tue, May 6, 2014 at 2:34 AM, Eberhard Beilharz <eb1 at sil.org> wrote:
>>>>
>>>>>
>>>>> You don't add a reference to unamanged dlls. Instead you need to
>>>>> create (or copy) a *.dll.config file that maps the dll name to the shared
>>>>> library (see http://www.mono-project.com/Interop_with_Native_Libraries
>>>>> ).
>>>>>
>>>>> However, in your case it looks more like it can't find *libclntsh.so*.
>>>>> Do you have that file on your system, and is it in your PATH?
>>>>>
>>>>> Hari wrote on 2014-05-05 at 17:22 +0200:
>>>>>
>>>>>  I am using the MonoDevelop IDE  4.2.3 and trying to run a C#
>>>>> application in RedHat Linux 6.5. While running the application, the
>>>>> Oracle(11g) Database "open" call is throwing the below exception. I am
>>>>> wondering how can I add the reference libclntsh.so  in to the
>>>>> Project/Solution using the IDE or how can I resolve the below issue?
>>>>>
>>>>>
>>>>> {System.DllNotFoundException: libclntsh.so   at (wrapper
>>>>> managed-to-native)
>>>>> System.Data.OracleClient.Oci.OciCalls/OciNativeCalls:OCIEnvCreate
>>>>> (intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
>>>>>   at System.Data.OracleClient.Oci.OciCalls.OCIEnvCreate (System.IntPtr&
>>>>> envhpp, OciEnvironmentMode mode, IntPtr ctxp, IntPtr malocfp, IntPtr
>>>>> ralocfp, IntPtr mfreep, Int32 xtramem_sz, IntPtr usrmempp) [0x00000] in
>>>>> /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs:778
>>>>>    at System.Data.OracleClient.Oci.OciEnvironmentHandle..ctor
>>>>> (OciEnvironmentMode mode) [0x00013] in
>>>>> /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:35
>>>>>    at System.Data.OracleClient.Oci.OciGlue.CreateConnection
>>>>> (OracleConnectionInfo conInfo) [0x00000] in
>>>>> /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OciGlue.cs:88
>>>>>    at System.Data.OracleClient.OracleConnectionPoolManager.CreateConnection
>>>>> (OracleConnectionInfo info) [0x00006] in
>>>>> /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPoolManager.cs:57
>>>>>    at System.Data.OracleClient.OracleConnectionPool.CreateConnection ()
>>>>> [0x0000e] in
>>>>> /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs:97
>>>>>    at System.Data.OracleClient.OracleConnectionPool.GetConnection ()
>>>>> [0x000ba] in
>>>>> /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnectionPool.cs:74
>>>>>    at System.Data.OracleClient.OracleConnection.Open () [0x00071] in
>>>>> /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleConnection.cs:420
>>>>>    at TRQAClient.Program.ConnectAndQuery () [0x00017] in
>>>>> /home/guest/source/Client/Client/Program.cs:31 }
>>>>> System.DllNotFoundException
>>>>>
>>>>> Thanks for your help
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Monodevelop-list mailing listMonodevelop-list at lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/monodevelop-list
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Monodevelop-list mailing list
>>>>> Monodevelop-list at lists.ximian.com
>>>>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20140506/1e47613f/attachment.html>


More information about the Monodevelop-list mailing list