错误解决:error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory,errorwhileloading_PHP教程

WBOY
Release: 2016-07-12 08:52:17
Original
4649 people have browsed it

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

Execute the following code to generate a unique UID

<span>$fp</span> = <span>popen</span>("/xxx/bin/tools/uuidgen system", "r"<span>);//
</span><span>$uid</span> = <span>fread</span>(<span>$fp</span>, 40960<span>);
</span><span>pclose</span>(<span>$uid</span>);
Copy after login

Problem: The returned result $uid is empty. In fact, after executing the popen function, the content resource(39) of type (stream) can be returned.

resource popen ( string $command , string $mode ) Parameters: $command command, $mod mode.

Opens a pipe to the process spawned by forking the execution of the given command command.

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

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

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

In this way, you will see the output error error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

means that the system does not know which directory libcurl.so is placed in.

Solution:

Add the directory where libcurl.so is located in /etc/ld.so.conf.

General so files will be in the directory /usr/local/lib (users can customize the directory), so in /etc/ld.so.conf Add the line /usr/local/lib (or user-defined directory),

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1127596.htmlTechArticleError resolution: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory, errorwhileloading executes the following code to generate the only...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template