Hi Monks,
I am working on a small linux distro for use on compact flash cards. I want have a full working perl interpreter in it so that I can script the distro easily. So I took a gentoo linux machine, installed perl and the modules that I need. I then copied the perl5.8.5 binary into my distro's root filesystem, and also the entire contents of /usr/lib/perl5 to the /usr/lib/perl5 directory of my distro. When I boot it (or chroot into for that matter), everything seems to work just fine, except for one thing. It seems that when I use the IO::Socket modules, or POE::Component::Server::TCP for that matter, it doesnt work when I use the following line of code:
$server = IO::Socket::INET->new(LocalPort=>$config{'port'},
Type=>SOCK_STREAM,
Proto=>'tcp',
Reuse=>1,
Listen=>1)
or die "Fatal Error opening the socket! $! : $@\n";
it errors, telling me this:
Fatal Error opening the socket! No such file or directory : IO::Socket::INET: Bad protocol 'tcp'
This only happens when I am chroot'ed into the root filesystem of my distro, not the gentoo distro that it originated from. Wierd huh? To reword my question, how can I take an existing perl interpreter, along with all of the modules installed, and transfer it from one system to another? Also, what libraries are needed for the whole thing to work? I did "ldd perl5.8.5" and made sure that my distro included all of the libs that it reported. Thanks in advance.
holli - added code tags
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.