Error solution: error while loading shared libraries: libcurl. so.4: cannot open shared object file: No such file or directory, errorwhileloading

Source: Internet
Author: User

Error solution: error while loading shared libraries: libcurl. so.4: cannot open shared object file: No such file or directory, errorwhileloading

Run the following code to generate a unique UID

$fp = popen("/xxx/bin/tools/uuidgen system", "r");//$uid = fread($fp, 40960);pclose($uid);

Problem: The returned result $ uid is null. Actually, after the popen function is executed, the returned content can be returned.resource(39) of type (stream).

 

Resource Popen(String $command, String $mode) Parameter: $ command, $ mod mode.

Open an pipeline pointing to a process, which is generated by running the command derived from a process.

If the command to be executed is not found, a valid resource is returned, which allows access to any error message returned by the shell.

/* Add redirection to get stderr output with a standard error. */

$fp = popen("/xxx/bin/tools/uuidgen system 2>&1", "r");

The error while loading shared libraries: libcurl. so.4: cannot open shared object file: No such file or directory is displayed.

The system does not know which directory libcurl. so is stored.

 

Solution:

Add the libcurl. so directory to/etc/ld. so. conf.

Generally, the so file will be in the/usr/local/lib directory (you can customize the Directory), so in the/etc/ld. so. add/usr/local/lib (or user-defined directory) to the conf file,

Finally, save/etc/ld. so. conf and execute the command [root @ www] #/sbin/ldconfig-v to take effect.

 

Reference: http://blog.csdn.net/kangear/article/details/9141481

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.