当前位置: 技术问答>linux和unix
centos 安装memcache 启动时出错 /usr/local/bin/memcached: error while loading shared lib
来源: 互联网 发布时间:2016-12-02
本文导语: 安装libevent ./configure -prefix=/usr/local/libevent/ make && make install 安装memcached ./configure -with-libevent=/usr/local/libevent/ make && make install 安装 memcache /usr/local/php5/bin/phpize Configuring for: PHP Api Version: 200412...
安装libevent
./configure -prefix=/usr/local/libevent/
make && make install
安装memcached
./configure -with-libevent=/usr/local/libevent/
make && make install
安装 memcache
/usr/local/php5/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
./configure -enable-memcache -with-php-config=/usr/local/php5/bin/php-config -with-zlib-dir
make && make install
ln -s /usr/local/php5/lib/libevent-1.3.so.1 /usr/lib/libevent-1.3.so.1
/usr/local/bin/memcached -d -m 10 -u root -l 192.168.56.101 -p 12000 -c 256 -P /tmp/memcached.pid
/usr/local/bin/memcached: error while loading shared libraries: libevent-1.3.so.1: cannot open shared object file: No such file or directory
为啥总出现/usr/local/bin/memcached: error while loading shared libraries: libevent-1.3.so.1: cannot open shared object file: No such file or directory
求高人赐教。
./configure -prefix=/usr/local/libevent/
make && make install
安装memcached
./configure -with-libevent=/usr/local/libevent/
make && make install
安装 memcache
/usr/local/php5/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
./configure -enable-memcache -with-php-config=/usr/local/php5/bin/php-config -with-zlib-dir
make && make install
ln -s /usr/local/php5/lib/libevent-1.3.so.1 /usr/lib/libevent-1.3.so.1
/usr/local/bin/memcached -d -m 10 -u root -l 192.168.56.101 -p 12000 -c 256 -P /tmp/memcached.pid
/usr/local/bin/memcached: error while loading shared libraries: libevent-1.3.so.1: cannot open shared object file: No such file or directory
为啥总出现/usr/local/bin/memcached: error while loading shared libraries: libevent-1.3.so.1: cannot open shared object file: No such file or directory
求高人赐教。
|
/etc/ld.so.conf文件中是否包含/usr/lib 不过这一个一般包含的
还有运行ldconfig试试,让系统的库信息重新更新一下
还有运行ldconfig试试,让系统的库信息重新更新一下
|
/etc/ld.so.conf 中加入
/usr/local/php5/lib/
执行 ldconfig
/usr/local/php5/lib/
执行 ldconfig
|
什么叫无语了 你前面已经找到解决方法了 可是你偏偏路径不对
你的库在/usr/local/libevent/lib/路径下 你看看你自己2楼添加的
/usr/lib/
/usr/lib/mysql/
/usr/lib/httpd/
/usr/local/lib/
没有一个是!