Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux ¹²Ïí¿â£ºLD_LIBRARY_PATH Óëld.so.conf

½ñÌìÔÚÔËÐÐsphinxµÄʱºò£¬Ìáʾ˵
./searchd: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
ÎÒ±àÒë°²×°µÄʱºòÃ÷Ã÷ÓÐÖ¸¶¨mysqlµÄlib¿â°¡£¬ÉÏÍø²éµ½ÊÇÒòΪmysqlµÄlib²»ÔÚϵͳµÄlib·¾¶ÖУ¬½â¾ö°ì·¨ÈçÏ£º
ÔÚ/etc/ld.so.confÏÂÃæ¼ÓÒ»ÐÐ/usr/local/webserver/mysql/lib/mysql/£¬±£´æ¹ýºóldconfigһϣ¬ÐµÄlibrary²ÅÄÜÔÚ³ÌÐòÔËÐÐʱ±»ÕÒµ½
¹ØÓÚldconfigµÄÏà¹ØÐÅÏ¢ÈçÏ£º
linux ÔËÐеÄʱºò£¬ÊÇÈçºÎ¹ÜÀí¹²Ïí¿â(*.so)µÄ£¿ÔÚ Linux ÏÂÃ棬¹²Ïí¿âµÄÑ°ÕҺͼÓÔØÊÇÓÉ /lib/ld.so ʵÏֵġ£ ld.so ÔÚ±ê׼·¾­(/lib, /usr/lib) ÖÐÑ°ÕÒÓ¦ÓóÌÐòÓõ½µÄ¹²Ïí¿â¡£
µ«ÊÇ£¬Èç¹ûÐèÒªÓõ½µÄ¹²Ïí¿âÔڷDZê׼·¾­£¬ld.so ÔõôÕÒµ½ËüÄØ£¿
Ä¿Ç°£¬Linux ͨÓõÄ×ö·¨Êǽ«·Ç±ê׼·¾­¼ÓÈë /etc/ld.so.conf£¬È»ºóÔËÐÐ ldconfig Éú³É /etc/ld.so.cache¡£ ld.so ¼ÓÔع²Ïí¿âµÄʱºò£¬»á´Ó ld.so.cache ²éÕÒ¡£
´«Í³ÉÏ£¬Linux µÄÏȱ² Unix »¹ÓÐÒ»¸ö»·¾³±äÁ¿£ºLD_LIBRARY_PATH À´´¦Àí·Ç±ê׼·¾­µÄ¹²Ïí¿â¡£ld.so ¼ÓÔع²Ïí¿âµÄʱºò£¬Ò²»á²éÕÒÕâ¸ö±äÁ¿ËùÉèÖõÄ·¾­¡£
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib
export LD_LIBRARY_PATH
µ«ÊÇ£¬Óв»ÉÙÉùÒôÖ÷ÕÅÒª±ÜÃâʹÓà LD_LIBRARY_PATH ±äÁ¿£¬ÓÈÆäÊÇ×÷Ϊȫ¾Ö±äÁ¿¡£ÕâЩÉùÒôÊÇ£º
* LD_LIBRARY_PATH is not the answer – http://prefetch.net/articles/linkers.badldlibrary.html
* Why LD_LIBRARY_PATH is bad – http://xahlee.org/UnixResource_dir/_/ldpath.html
* LD_LIBRARY_PATH – just say no – http://blogs.sun.com/rie/date/20040710
½â¾öÕâÒ»ÎÊÌâµÄÁíÒ»·½·¨ÊÇÔÚ±àÒëµÄʱºòͨ¹ý -R<path> Ñ¡ÏîÖ¸¶¨ run-time path¡£
1. Íù/libºÍ/usr/libÀïÃæ¼Ó¶«Î÷£¬ÊDz»ÓÃÐÞ¸Ä/etc/ld.so.confµÄ£¬µ«ÊÇÍêÁËÖ®ºóÒªµ÷Ò»ÏÂldconfig£¬²»È»Õâ¸ölibrary»áÕÒ²»µ½
2. ÏëÍùÉÏÃæÁ½¸öĿ¼ÒÔÍâ¼Ó¶«Î÷µÄʱºò£¬Ò»¶¨ÒªÐÞ¸Ä/etc/ld.so.conf£¬È»ºóÔÙµ÷ÓÃldconfig£¬²»È»Ò²»áÕÒ²»µ½
±È Èç°²×°ÁËÒ»¸ömysqlµ½/usr/local/mysql£¬mysqlÓÐÒ»´ó¶ÑlibraryÔÚ/usr/local/mysql/libÏÂÃ棬Õâʱ¾Í ÐèÒªÔÚ/etc/ld.so.confÏÂÃæ¼ÓÒ»ÐÐ/usr/local/mysql/lib£¬±£´æ¹ýºóldconfigһϣ¬ÐµÄlibrary²ÅÄÜÔÚ³Ì ÐòÔËÐÐʱ±»ÕÒµ½¡£
3. Èç¹ûÏëÔÚÕâÁ½¸öĿ¼ÒÔÍâ·Ålib£¬µ«ÊÇÓÖ²»ÏëÔÚ/etc/ld.so.confÖмӶ«Î÷£¨»òÕßÊÇûÓÐȨÏÞ¼Ó¶«Î÷£©¡£ÄÇÒ²¿ÉÒÔ£¬¾ÍÊÇexportÒ»¸öÈ«¾Ö±ä Á¿LD_LIBRA


Ïà¹ØÎĵµ£º

LinuxÓû§ºÍ×é

Ò»¡¢Àí½âLinuxµÄµ¥Óû§¶àÈÎÎñ£¬¶àÓû§¶àÈÎÎñ¸ÅÄ
Linux ÊÇÒ»¸ö¶àÓû§¡¢¶àÈÎÎñµÄ²Ù×÷ϵͳ£»ÎÒÃÇÓ¦¸ÃÁ˽ⵥÓû§¶àÈÎÎñºÍ¶àÓû§¶àÈÎÎñµÄ¸ÅÄ
1¡¢Linux µÄµ¥Óû§¶àÈÎÎñ£»
µ¥Óû§¶àÈÎÎñ£»±ÈÈçÎÒÃÇÒÔbeinan µÇ¼ϵͳ£¬½øÈëϵͳºó£¬ÎÒÒª´ò¿ªgedit À´Ð´Îĵµ£¬µ«ÔÚдÎĵµµÄ¹ý³ÌÖУ¬ÎҸоõÉÙµãÒôÀÖ£¬ËùÒÔÓÖ´ò¿ªxmms
À´µãÒôÀÖ ......

linuxÍøÂç²ÎÊý½âÎö

linuxÍøÂç²ÎÊýÖ÷ҪλÓÚÏÂÃæÁ½¸öĿ¼ÏÂ:/proc/sys/net/core/ºÍ/proc/sys/net/ipv4/, ÏÂÃæ·Ö±ð¶ÔÕâÁ½¸öĿ¼Ï³£Óõļ¸¸öÍøÂç²ÎÊý×öÏÂ˵Ã÷:
 
1./proc/sys/net/core/
 
$ /proc/sys/net/core/somaxconn
listen()µÄĬÈϲÎÊý,¹ÒÆðÇëÇóµÄ×î´óÊýÁ¿.ĬÈÏÊÇ128.¶Ô·±Ã¦µÄ·þÎñÆ÷,Ôö¼Ó¸ÃÖµÓÐÖúÓÚÍøÂçÐÔÄÜ, ¿É²Î¿¼µÄÓÅ»¯Ö ......

ѧϰLINUX²½Ö裨ת£©

1¡¢Linux »ù´¡
°²×°Linux²Ù×÷ϵͳ LinuxÎļþϵͳ Linux³£ÓÃÃüÁî LinuxÆô¶¯¹ý³ÌÏê½â ÊìϤLinux·þÎñÄܹ»¶ÀÁ¢°²×°Linux²Ù×÷ϵͳ Äܹ»ÊìÁ·Ê¹ÓÃLinuxϵͳµÄ»ù±¾ÃüÁî ÈÏʶLinuxϵͳµÄ³£Ó÷þÎñ°²×°Linux²Ù×÷ϵͳ Linux»ù±¾ÃüÁîʵ¼ù ÉèÖÃLinux»·¾³±äÁ¿ ¶¨ÖÆLinuxµÄ·þÎñ Shell ±à³Ì»ù´¡Ê¹ÓÃvi±à¼­Îļþ ʹÓÃEmacs±à¼­Îļþ ʹÓÃÆäËû±à ......

LinuxĿ¼½á¹¹,д¸øWindowsÓû§µÄLinuxĿ¼½á¹¹µÄ½éÉÜ

ÓëWindows½«Ó²ÅÌ¿´×ö“CÅÌ”¡¢“DÅÌ”¼¸¸ö¶ÀÁ¢µÄ·ÖÇø²»Í¬£¬Linux½«Õû¸öÎļþϵͳ¿´×öÒ»¿ÃÊ÷£¬Õâ¿ÃÊ÷µÄÊ÷¸ù½Ð×ö¸ùÎļþϵͳ£¬ÓÃ/±íʾ¡£¸÷¸ö·ÖÇøͨ¹ý“¹ÒÔØ”£¨mount£©ÒÔÎļþ¼ÐµÄÐÎʽ·ÃÎÊ¡£
 
 ÔÚ/ÖеÄÎļþ¼ÐºÜ¶à£¬±¾ÎĽéÉܳ£¼ûÎļþ¼ÐµÄÒâÒå¡£LinuxµÄĿ¼½á¹¹È·Êµ±È½Ï¸´ÔÓ£¬µ«ÉèÖÃºÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ