Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

remove directory from @INC

743 views
Skip to first unread message

Huub van Niekerk

unread,
Nov 27, 2009, 2:58:17 PM11/27/09
to begi...@perl.org
Hi,

Sorry if this is the wrong group.

Using Fedora Linux, due to system changes the path to the Perl modules
has changed. I've found that @INC contains the new path, but it's placed
after the old path. So now I'm getting messages that modules can't be
found in @INC anymore. The docs I've read all tell me that I have to use
perl -I<name> to add a directory. But how do I remove the old paths?

Than you for helping out.

Shawn H Corey

unread,
Nov 27, 2009, 4:22:35 PM11/27/09
to Huub van Niekerk, begi...@perl.org

Remove them in a BEGIN{} block before any `use` module statements. You
can also add directories by `use lib 'directory';` See `perldoc lib`.


--
Just my 0.00000002 million dollars worth,
Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Huub van Niekerk

unread,
Nov 28, 2009, 3:49:03 AM11/28/09
to Shawn H Corey, begi...@perl.org
Thank you for your answer.

I changed the beginning of my code to this:

#!/usr/bin/perl
no lib "/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/";
use lib "/usr/lib/perl5/5.10.0/i386-linux-thread-multi/";
use DBI;
use strict;
use warnings;
use PostScript::Simple;

No errors are given anymore in the editor. However, when I run the code,
this message is still given:

install_driver(mysql) failed: Can't load
'/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so'
for module DBD::mysql: libssl.so.8: cannot open shared object file: No such
file or directory at
/usr/lib/perl5/5.10.0/i386-linux-thread-multi//DynaLoader.pm line 203.
at (eval 3) line 3

In Fedora 12, libssl.so.8 has been replaced by libssl.so.10. Can you give me
an idea on how to solve this?

Thank you for helping out.

Owen

unread,
Nov 28, 2009, 2:55:47 PM11/28/09
to Huub van Niekerk, begi...@perl.org

> Thank you for your answer.
>
> I changed the beginning of my code to this:
>
> #!/usr/bin/perl
> no lib
> "/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/";
> use lib "/usr/lib/perl5/5.10.0/i386-linux-thread-multi/";
> use DBI;
> use strict;
> use warnings;
> use PostScript::Simple;
>
> No errors are given anymore in the editor. However, when I run the
> code,
> this message is still given:
>
> install_driver(mysql) failed: Can't load
> '/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so'
> for module DBD::mysql: libssl.so.8: cannot open shared object file: No
> such
> file or directory at
> /usr/lib/perl5/5.10.0/i386-linux-thread-multi//DynaLoader.pm line 203.
> at (eval 3) line 3
>
> In Fedora 12, libssl.so.8 has been replaced by libssl.so.10. Can you
> give me
> an idea on how to solve this?
>
> Thank you for helping out.

Well I have no idea if it will solve your problem, but try one of these;

a. make a symbolic link between libssl.so.8 and libssl.so.10
b. or simply copy libssl.so.10 as lbssl.so.8

--

Owen

Huub van Niekerk

unread,
Nov 28, 2009, 4:06:47 PM11/28/09
to begi...@perl.org
>
> Well I have no idea if it will solve your problem, but try one of these;
>
> a. make a symbolic link between libssl.so.8 and libssl.so.10 b. or
> simply copy libssl.so.10 as lbssl.so.8
>

Thank you. Didn't think of "ln -s". That works now.

0 new messages