Fix Net::zookeeper cannot find the dynamic link library symbol problem

Source: Internet
Author: User

Reference Net::zookeeper This package, may be reported this error

Can ' t load '/usr/local/lib64/perl5/auto/net/zookeeper/zookeeper.so ' for module Net::zookeeper:/usr/local/lib64/ perl5/auto/net/zookeeper/zookeeper.so:undefined symbol:zoo_perm_create at/usr/lib64/perl5/xsloader.pm Line 70. AT/USR/LOCAL/LIB64/PERL5/NET/ZOOKEEPER.PM Line 109.

View the 70 lines of XSLOADER.PM:

My $libref = dl_load_file ($file, 0) or do {require Carp; Carp::croak ("Can ' t load ' $file ' for Module $module: ". Dl_error ()); 73};

is actually loading zookeeper.so this dynamic link library. Let's objdump to see if this missing symbol is in this link library.

[[email protected] xoa2-perl]$ objdump -x /usr/local/lib64/perl5/auto/net/zookeeper/ zookeeper.so | grep zoo0000000000000000         * und*  0000000000000000               ZOO_PERM_CREATE0000000000000000         *UND*   0000000000000000              zoo_read_ acl_unsafe0000000000000000         *und*   0000000000000000              zoo_perm_ write0000000000000000         *und*  0000000000000000               zoo_associating_ State0000000000000000         *und*  0000000000000000               ZOO_CREATED_EVENT0000000000000000          *UND*  0000000000000000               ZOO_CONNECTED_STATE0000000000000000          *UND*  0000000000000000               ZOO_AUTH_FAILED_STATE0000000000000000          *UND*  0000000000000000               zoo_ephemeral0000000000000000         * und*  0000000000000000               zoo_sequence0000000000000000         *und*  0000000000000000               ZOO_PERM_READ0000000000000000          *UND*  0000000000000000               ZOO_CREATOR_ALL_ACL0000000000000000          *UND*  0000000000000000               ZOO_PERM_ALL0000000000000000          *UND*  0000000000000000               ZOO_DELETED_EVENT0000000000000000          *UND*  0000000000000000               zoo_open_acl_unsafe0000000000000000         *und*  0000000000000000               zoo_perm_admin0000000000000000          *UND*  0000000000000000               ZOO_CONNECTING_STATE0000000000000000          *UND*  0000000000000000               ZOO_EXPIRED_SESSION_STATE0000000000000000          *UND*  0000000000000000               ZOO_NOTWATCHING_EVENT0000000000000000          *UND*  0000000000000000               zoo_perm_delete0000000000000000         *und*   0000000000000000              zoo_ changed_event0000000000000000         *und*   0000000000000000              zoo_child_ event0000000000000000         *und*  0000000000000000               zoo_session_event

Marked as UND, which indicates that this is an external symbol and should be referenced by other libraries, is estimated to be the zookeeper library. But the Lib package has joined the Ld_library_path, very strange.

Try recompiling zookeeper.so (source under Zookeeper Contrib/zkperl), discover that the release package is organized with Makemaker, first generate makefile, and get the following hint:

[Email protected] zkperl]$ Perl makefile.pl Warning (Mostly harmless): No library found for-lzookeeper_mtgenerating a Un Ix-style makefilewriting Makefile for net::zookeeperwriting mymeta.yml and Mymeta.json

Note the first line of warning, which is the key to solving the problem. Most harmless,but harm this time. View the 31st line of makefile.pl

GetOptions (+ ' zookeeper-include=s ' + \ @zk_inc_paths, ' zookeeper-lib=s ' and ' = ' @zk_lib_paths 34);

Visible the second option is required.

Recompile.

[Email protected] zkperl]$ perl makefile.pl--zookeeper-lib=/home/zhangbin/env/libchecking If your kit is complete ... Looks goodgenerating a unix-style makefilewriting Makefile for net::zookeeperwriting mymeta.yml and Mymeta.json

Then make && sudo make install. Problem solving.

It may xsloader that there is no mechanism to automatically find available libraries and symbol tables from Ld_library_path.



This article is from the "New Youth" blog, please be sure to keep this source http://luckybins.blog.51cto.com/786164/1613660

Fix Net::zookeeper cannot find the dynamic link library symbol problem

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.