Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

Unable to load dynamic library cubrid.so - libcascci.so.8

CUBRID Official Forum » Programming Languages » PHP, PDO API » Unable to load dynamic library cubrid.so - libcascci.so.8

author
message
[레벨:0]ramy

Post subject: Unable to load dynamic library cubrid.so - libcascci.so.8

registered: 05/31/2011

아이피: *.39.9.251

views: 91

Hello,
I installed Cubrid 2.2 on my server, which has PHP 5.2.
I copied the cubrid.so into my extension directory (/usr/lib/php5/2006...), but when I restart my Apache, I get the following error message :
Someone...
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/cubrid.so' - libcascci.so.8: cannot open shared object file: No such file or directory in Unknown on line 0

I guess it's because the Cubrid extensions (including libcascci.so.8) are not in the same directory as my PHP extensions.
So how can I get Cubrid to work properly ?
Sorry for my approximative english, and thank you for your answers.
Ramy

Quote
[레벨:0]ramy

# Post subject:Re: Unable to load dynamic library cubrid.so - libcascci.so.8

profile

registered: 05/31/2011

아이피: *.39.9.251

Hi,
Thanks for your answer.
When I type echo $CUBRID in my terminal, I get /usr/bin/cubrid/CUBRID, which is the path to my Cubrid installation.
By the way, I can't install Cubrid with the PECL installer, because I get an error. I can retry to show you the error.

Quote
[레벨:0]ramy

# Post subject:Re: Unable to load dynamic library cubrid.so - libcascci.so.8

profile

registered: 05/31/2011

아이피: *.39.9.251

My environnement is the following :
- OS : ubuntu 9.04
- Cubrid : 2.2
- PHP : 5.2
- Apache : 2.2
If you need more precise informations, could you tell me how to get these informations please ?

And for you idea to install Cubrid 3.0, I can't, because Cubrid 3.0 is only compatible with PHP 5.3, and PHP 5.3 is not compatible with Ubuntu 9.04 (well, it is, but it's not in the default packages, so it looks more difficult to install...). The solution would be to upgrade my server, but I can't do it now...

Quote
[레벨:0]ramy

# Post subject:Re: Unable to load dynamic library cubrid.so - libcascci.so.8

profile

registered: 05/31/2011

아이피: *.39.9.251

By the way, when I try to install Cubrid with PECL, I get the following error (at the end of the output) :
running: make
/bin/bash /var/tmp/pear-build-root/CUBRID-8.3.0.0003/libtool --mode=compile gcc -I. -I/tmp/pear/temp/CUBRID -DPHP_ATOM_INC -I/var/tmp/pear-build-root/CUBRID-8.3.0.0003/include -I/var/tmp/pear-build-root/CUBRID-8.3.0.0003/main -I/tmp/pear/temp/CUBRID -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/bin/cubrid/CUBRID/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/CUBRID/php_cubrid.c -o php_cubrid.lo
libtool: compile: gcc -I. -I/tmp/pear/temp/CUBRID -DPHP_ATOM_INC -I/var/tmp/pear-build-root/CUBRID-8.3.0.0003/include -I/var/tmp/pear-build-root/CUBRID-8.3.0.0003/main -I/tmp/pear/temp/CUBRID -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/bin/cubrid/CUBRID/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/CUBRID/php_cubrid.c -fPIC -DPIC -o .libs/php_cubrid.o
/tmp/pear/temp/CUBRID/php_cubrid.c: In function âzif_cubrid_field_flagsâ:
/tmp/pear/temp/CUBRID/php_cubrid.c:2627: error: âT_CCI_COL_INFOâ has no member named âis_primary_keyâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2631: error: âT_CCI_COL_INFOâ has no member named âis_unique_keyâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2635: error: âT_CCI_COL_INFOâ has no member named âis_foreign_keyâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2639: error: âT_CCI_COL_INFOâ has no member named âis_auto_incrementâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2643: error: âT_CCI_COL_INFOâ has no member named âis_sharedâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2647: error: âT_CCI_COL_INFOâ has no member named âis_reverse_indexâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2651: error: âT_CCI_COL_INFOâ has no member named âis_reverse_uniqueâ
/tmp/pear/temp/CUBRID/php_cubrid.c: In function âzif_cubrid_fetch_fieldâ:
/tmp/pear/temp/CUBRID/php_cubrid.c:2897: error: âT_CCI_COL_INFOâ has no member named âdefault_valueâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2900: error: âT_CCI_COL_INFOâ has no member named âis_unique_keyâ
/tmp/pear/temp/CUBRID/php_cubrid.c:2901: error: âT_CCI_COL_INFOâ has no member named âis_unique_keyâ
make: *** [php_cubrid.lo] Error 1
ERROR: `make' failed

Quote
[레벨:3]eye

# Post subject:Re: Unable to load dynamic library cubrid.so - libcascci.so.8

profile

registered: 05/31/2011

아이피: *.91.137.50

Hi ramy,

I guess I found your problem. I have installed Ubuntu 10.4, CUBRID 2.2, PHP 5.2, and Apache 2.2, and I noticed that cubrid.so cannot find the libcascci.so.8 library even if it exists in the /lib directory inside the directory where you installed CUBRID. In fact, libcascci.so.8 is a symbolic link to the actual libcascci.so.8.2.2 library.

When you install CUBRID, it adds the Environment variable called LD_LIBRARY_PATH which points to /home/cubriduser/CUBRID/lib (considering that user is cubriduser and you have installed CUBRID to /home/cubriduser/CUBRID.

The problem is Apache runs under a different user (perhaps root) thus does not see the environment variable of your user. So, we have to create the link file in /usr/lib directory under the root.

1) In your terminal rewrite the env. variable (remember to change the last path to the actual /lib directory where you have installed CUBRID).
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/cubriduser/CUBRID/lib
2) Create a link:
sudo ln -s /home/cubriduser/CUBRID/lib/libcascci.so /usr/lib/libcascci.so.8
If you run under Ubuntu 64-bit, change the destination path to
sudo ln -s /home/cubriduser/CUBRID/lib/libcascci.so /usr/lib64/libcascci.so.8
3) Add the CUBRID /lib to the path:
sudo gedit /etc/ld.so.conf
Then in the Editor add your CUBRID /lib path at the end of the file like (remember not to replace, but just add to the last line):
/home/cubriduser/CUBRID/lib
4) Tell system to refresh its temporary cash file. Note that the ldconfig starts with L not I.
sudo ldconfig
This will create a temporary cache file named ld.so.cache.

5) Now reboot your system.
sudo reboot

This should solve your problem.

Quote
[레벨:0]ramy

# Post subject:Re: Unable to load dynamic library cubrid.so - libcascci.so.8

profile

registered: 05/31/2011

아이피: *.39.9.251

Woohoo, it works perfectly !
Thank you for your time, and for your useful answers !
Bye !

Quote




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: