Home >Backend Development >PHP Tutorial >200分请教strace发现的一个问题

200分请教strace发现的一个问题

WBOY
WBOYOriginal
2016-06-23 14:26:26984browse

linux,命令行下执行: strace /usr/php/bin/php

出现:
open("/usr/libmemcached/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/libmcrypt//lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/libevent/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/libpng/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/curl/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/ImageMagick/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/jpeg/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/libxml2/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/openssl/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/zlib/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/bzip2/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/freetype2/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/libmcrypt/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/libmemcached//lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/mysql/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=17301, ...}) = 0
mmap(NULL, 17301, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7fbf98115000
close(4)                                = 0
open("/lib64/libnss_files.so.2", O_RDONLY) = 4


满屏都是这种open找不到,它为啥不能直接定位到(最后一行)呢?是配置有问题?


回复讨论(解决方案)

/etc/ld.so.conf配置文件内容呢。

[root@localhost ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/bzip2/lib
/usr/local/openssl/lib
/usr/local/libmcrypt/lib
/usr/local/lib
/usr/local/freetype2/lib
/usr/local/mhash/lib
/usr/local/db/lib
/usr/local/fontconfig/lib

Statement:
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