perlbrew problem with Net::DNS

作者:   發佈於:  

If you're on Mac, using perlbrew and try to install Net::DNS, you might see it fail with this error message:

ld: in netdns.a, archive has no table of contents
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Net/DNS/DNS.bundle] Error 1

I'm not sure what causes it yet but I'm guessing that I need to play with some LD_LIBRARY_* variables since perlbrew installs perl to $HOME. Before it's fixed, heres' an work-around:

ranlib netdns.a

Execute that command after you see the ld error. After that, proceed the installation with:

make test && make install

You should see the tests are passing just fine.