Module install problem DBD::Unify

Discussion in 'Perl Misc' started by Justin C, Nov 4, 2011.

  1. Justin C

    Justin C Guest

    I'm trying to install the DBD::Unify module. My usual install method is
    from within the cpan shell:

    cpan> install DBD::Unify

    This failed initially because I didn't have $DBPATH environment set.
    Having fixed that I got a different failure, and the same failure if I,
    in the build directory, run

    [justin@server]$ perl Makefile.PL
    [justin@server]$ make

    I don't seem to see any errors until this one:

    if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then chcon -t textrel_shlib_t blib/arch/auto/DBD/Unify/Unify.so; fi
    chcon: failed to change context of blib/arch/auto/DBD/Unify/Unify.so to root:eek:bject_r:textrel_shlib_t: Invalid argument
    make: *** [linkext] Error 1

    Until today I'd never even heard of chcon. Any suggestions on how I fix
    this?

    Justin.

    --
    Justin C, by the sea.
    Justin C, Nov 4, 2011
    #1
    1. Advertising

  2. Justin C

    Justin C Guest

    On 2011-11-04, Justin C <> wrote:
    >
    > I'm trying to install the DBD::Unify module. My usual install method is


    [snip]

    > I don't seem to see any errors until this one:
    >
    > if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then chcon -t textrel_shlib_t blib/arch/auto/DBD/Unify/Unify.so; fi
    > chcon: failed to change context of blib/arch/auto/DBD/Unify/Unify.so to root:eek:bject_r:textrel_shlib_t: Invalid argument
    > make: *** [linkext] Error 1
    >
    > Until today I'd never even heard of chcon. Any suggestions on how I fix
    > this?



    I've Googled this a bit further and am happy that it's not a Perl
    problem. I'm pursuing a solution in Linux groups.

    If anyone here has any suggestions I'd still be happy to hear them.


    Justin.

    --
    Justin C, by the sea.
    Justin C, Nov 4, 2011
    #2
    1. Advertising

  3. Justin C

    ela Guest

    "Justin C" <> wrote in message
    news:...
    >
    > I'm trying to install the DBD::Unify module. My usual install method is
    > from within the cpan shell:
    >
    > cpan> install DBD::Unify
    >
    > This failed initially because I didn't have $DBPATH environment set.
    > Having fixed that I got a different failure, and the same failure if I,
    > in the build directory, run


    When I use my clean OS to install perl modules by cpan, I also encounter a
    similar problem as Justin did. I have read CPAN documentation and it says it
    is able to resolve dependencies itself. Well, it is rather frustrated to not
    know exactly what and the order of modules to install or what environment
    variables have to set to fix the problem. Is there any good reference book
    to read for Perl module/distribution installation?
    ela, Nov 5, 2011
    #3
  4. Justin C

    Justin C Guest

    On 2011-11-04, Ben Morrow <> wrote:
    >
    > Quoth Justin C <>:
    >>
    >> I'm trying to install the DBD::Unify module. My usual install method is
    >> from within the cpan shell:
    >>
    >> cpan> install DBD::Unify
    >>
    >> This failed initially because I didn't have $DBPATH environment set.
    >> Having fixed that I got a different failure, and the same failure if I,
    >> in the build directory, run
    >>
    >> [justin@server]$ perl Makefile.PL
    >> [justin@server]$ make
    >>
    >> I don't seem to see any errors until this one:
    >>
    >> if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
    >> chcon -t textrel_shlib_t blib/arch/auto/DBD/Unify/Unify.so; fi
    >> chcon: failed to change context of blib/arch/auto/DBD/Unify/Unify.so to
    >> root:eek:bject_r:textrel_shlib_t: Invalid argument
    >> make: *** [linkext] Error 1
    >>
    >> Until today I'd never even heard of chcon. Any suggestions on how I fix
    >> this?

    >
    > I would start by editing the Makefile.PL and commenting out the six
    > lines starting with
    >
    > 'linkext::',


    Great minds.... etc.

    I spent most of Saturday morning reading about SELinux and still not
    understanding it. I also looked into how to disable it and couldn't find
    anything concrete other than: "It could cause problems when you
    re-enable it".

    So the Makefile.PL needed to be looked at. All I did was comment the 'if
    ....' line following 'linkedt::', and the 'if ...' line following
    'install::'. I then did a manual install.

    What I can't figure out, though, is that I built it in
    /root/.cpan/build/..., I was root (su -- root), but it still installed
    the files under /home/justin/perl5/lib... Fortunately there were not
    many of them, I just moved them to the same place as other locally
    install modules and all it working as I'd expect. But why did it install
    under my home dir? ... prolly another Linux Q rather than perl...


    > in sub postamble. If that works then you should file a DBD::Unify bug
    > with full details of your Linux setup, including anything you've changed
    > wrt SELinux.


    Seeing as it works submit the report this afternnon.


    > Otherwise, I'm afraid I don't know: you'll need to ask someone who knows
    > about SELinux. I have to say I don't really see why DBD::Unify needs
    > special SELinux setup when other modules don't.


    It's my first real contact with SELinux. I'm not sure I like it!


    Justin.

    --
    Justin C, by the sea.
    Justin C, Nov 7, 2011
    #4
  5. Justin C

    Justin C Guest

    On 2011-11-07, Ben Morrow <> wrote:
    >
    > Quoth Justin C <>:
    >>
    >> What I can't figure out, though, is that I built it in
    >> /root/.cpan/build/..., I was root (su -- root), but it still installed
    >> the files under /home/justin/perl5/lib...



    > There will be one of three answers to that: either the wrong values have
    > got into the root-owned global config file, or your 'su' session is
    > picking up your user-owned config file, or you've set something like
    > PERL_MM_OPT in the environment and su didn't clear it.


    [snip]

    Thank you for the very detailed explanation, Ben. Turns out my making it
    as myself set INSTALL_BASE which was not overwritten by when I tried to
    make as root... I've not done much module building by hand, generally
    they install just fine for me from within the cpan shell... I don't know
    if 'make clean' is standard in these module packages, and, with
    hindsight, I should have done it.

    Still, no harm done, as I mentioned, there were very few files created
    by the build and moving them into the correct location worked just fine.

    With any luck cpan shell will not fail me again... which it didn't this
    time, I just got bitten by ****ing SELinux.

    Justin.

    --
    Justin C, by the sea.
    Justin C, Nov 8, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Crook

    DBD::CSV questions and is there a DBD::XML?

    Andrew Crook, Sep 2, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    159
    Andrew Crook
    Sep 11, 2003
  2. Mike Solomon

    DBD::mysqlPP v DBD::mysql

    Mike Solomon, Feb 16, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    198
    James Willmore
    Feb 16, 2004
  3. meneg
    Replies:
    2
    Views:
    108
    meneg
    Nov 17, 2004
  4. Richard Gration
    Replies:
    1
    Views:
    143
    Richard Gration
    Jul 7, 2005
  5. Jim Cochrane
    Replies:
    0
    Views:
    109
    Jim Cochrane
    Aug 25, 2007
Loading...

Share This Page