سؤال

أنا أركض سولاريس 10.

لقد قمت بتحميل وتثبيت بيرل من com.sunfreeware.

عندما أحاول تنفيذ أمر CPAN، حصلت على الخطأ التالي.

# perl -MCPAN -e shell
Now you need to choose your CPAN mirror sites.  You can let me
pick mirrors for you, you can select them from a list or you
can enter them by hand.

Would you like me to automatically choose the best CPAN mirror
sites for you? (This means connecting to the Internet and could
take a couple minutes) [yes]

Trying to fetch a mirror list from the Internet
  LWP not available
  LWP not available
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
ld.so.1: perl: fatal: relocation error: file /usr/local/lib/perl5/5.12.3/i86pc-solaris/auto/Socket/Socket.so: symbol inet_aton: referenced symbol not found
Killed
#

ldd لا يبدو أن هناك مشكلة

# ldd /usr/local/lib/perl5/5.12.3/i86pc-solaris/auto/Socket/Socket.so
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2

هل لديك أي فكرة عما أفتقده؟

هل كانت مفيدة؟

المحلول

لتجنب إعادة الترجمة اليدوية لكل شيء، تكوين CPAN make_arg مع LIBS=-lresolv و mbuild_arg مع --config libs=-lresolv.(يؤدي هذا إلى إضافة المكتبة عالميًا لجميع عمليات تشغيل ترجمة توزيعة Perl.) ثم قم بإصدار CPAN recompile يأمر.لم أختبر هذا.قم بتجربة نظام احتياطي أولاً، لتتمكن من استعادة شجرة Perl إذا حدث خطأ ما.

إذا كنت تفترض أن توزيعة المقبس فقط هي التي تحتاج إلى معلمة libs الإضافية، فمن الأفضل إعادة ترجمة هذه المعلمة يدويًا:

$ cpan
cpan> look Socket
Socket$ perl Makefile.PL LIBS=-lresolv ; make ; make test
Socket$ sudo make install
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top