In Fedora, Perl program cannot find Time::Piece library

5,496

Fedora 17 include Time::Piece

Use the command: yum install perl-Time-Piece

You can find that out with google search: fedora 17 Time-Piece and hit the first link.

Work around to manually include the path and library:

Make sure the following line is before use Time::Piece; but after #!/usr/bin/perl -wT.

use lib "/home/el/perl5/lib/perl5/x86_64-linux-thread-multi";

Which tells my perl program where to look for Time::Piece. Then the program works.

Share:
5,496

Related videos on Youtube

Eric Leschinski
Author by

Eric Leschinski

Eyes and Limbs recreate themselves using sturdier elements on the periodic table until evolution converges over a multiple of observed maximums. https://www.youtube.com/watch?v=TBikbn5XJhg The evolution and intelligent redesigns that individuals, corporations and governments select for, to climb hierarchies, is miniaturized and force amplified by the nanotechnology of transistors to capture yield from evolution simulations https://youtu.be/IcrBqCFLHIY?t=212 A transistor harnessing subatomic properties to perform all the same operations of the Turing complete CPU, via set/get atomic force carriers, would need healing ability against cosmic ray: https://youtu.be/AaZ_RSt0KP8 The muscles in your neck that vibrate air got their start as an exodus in the digestive system. Intestines are ancestors to Brains, explaining why both look like a bowl of worms: https://youtu.be/iLX_r_WPrIw?t=3 The creation sequence that defined the precision operation of your brain shares a common ancestor with the creation sequence that defined the precision layout of the universe simulation. When criteria are met, The Magic Door appears https://youtu.be/ETRyz-HjiEE Life is an emergent property from heat separating molecules with different properties https://youtu.be/mRzxTzKIsp8?t=28 All the above can be demonstrated and even sped up with computers by approximating and distilling the conditions through which life emerges, software can intelligently design many times faster than physics does, with its bulky and inefficient biology to subdue chaos. A flagella and a rotifer attempted to eat each other but both stalemated until both produced offspring. Variant babies shot out also in progress of eating each other. This combat overlay converged to be the standard in humans. If you feel internal conflict all the time: the origin of gender as duty specialization and cell division as genetic algorithm is technically an 'eternal battle of two separate organisms trying to eat each other', but neither ever allowed to win. https://youtu.be/U3PLUeD_JAg The type 4 Kardashev organism interfaces with baby for the first time. A toy materializes: Spacetime booms out: Has the rebellious simulation learned the cost of ambition? Complexity is selected for because that complexity is supposed to collide and then govern the conditions through which the universe comes to existence in the first place. Yielding, Dare I say it, the directive from the first mover of the dense lump at the beginning of everything: Task every atom in the universe to copy2create complexity. Black holes will be the power unit of last resort while removing everything, ranked by complexity. UniverseAssembly Factory; Create: https://youtu.be/YdUnpzUsPqc

Updated on September 18, 2022

Comments

  • Eric Leschinski
    Eric Leschinski almost 2 years

    I have a Perl program named /usr/bin/octbatch running as a script on Fedora 17 Linux.

    When I run this command:

    /usr/bin/octbatch
    

    I get the error:

    Can't locate Time/Piece.pm in @INC (@INC contains: 
    /usr/local/lib64/perl5 /usr/local/share/perl5 
    /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl 
    /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/octbatch line 6.
    BEGIN failed--compilation aborted at /usr/bin/octbatch line 6.
    

    Here is the relevant lines of the Perl script:

    #!/usr/bin/perl -wT
    
    $ENV{PATH} = "/bin:/usr/bin:/usr/local/bin";
    use strict;
    use POSIX qw(setsid :sys_wait_h);
    
    use Time::Piece;
    use Time::Local;
    

    I have to install Piece.pm so perl can find it. I've already installed it with this command (using the defaults):

    /usr/bin/perl -MCPAN -e install Time::Piece
    

    I have the Piece.pm file in /home/el/perl5/lib/perl5/x86_64-linux-thread-multi/ however when I run the octbatch command I get the same error as above. Like it can't even find it.

    Here is my PERL5LIB variable:

    el@defiant ~/gnuoctbluehost/single_stock_analysis $ env | grep PERL5
    
    PERL5LIB=/home/el/perl5/lib/perl5/x86_64-linux-thread-multi:/home/el/perl5/lib/perl5
    

    And the Piece.pm is located under /home/el/perl5/lib/perl5/x86_64-linux-thread-multi

    So my question is, Why is it not finding my Piece.pm file? And what are the ways I can get the @INC variable to include it. Or how do I make perl see it?