Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Module install problem DBD::Unify

Reply
Thread Tools

Module install problem DBD::Unify

 
 
Justin C
Guest
Posts: n/a
 
      11-04-2011

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 rootbject_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.
 
Reply With Quote
 
 
 
 
Justin C
Guest
Posts: n/a
 
      11-04-2011
On 2011-11-04, Justin C <(E-Mail Removed)> 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 rootbject_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.
 
Reply With Quote
 
 
 
 
ela
Guest
Posts: n/a
 
      11-05-2011

"Justin C" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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?


 
Reply With Quote
 
Justin C
Guest
Posts: n/a
 
      11-07-2011
On 2011-11-04, Ben Morrow <(E-Mail Removed)> wrote:
>
> Quoth Justin C <(E-Mail Removed)>:
>>
>> 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
>> rootbject_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.
 
Reply With Quote
 
Justin C
Guest
Posts: n/a
 
      11-08-2011
On 2011-11-07, Ben Morrow <(E-Mail Removed)> wrote:
>
> Quoth Justin C <(E-Mail Removed)>:
>>
>> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to install module, No module named scipy_distutils.core (but ihave scipy) process Python 1 10-17-2008 06:19 PM
How to install module when I am not allowed to install moudule in system directory? zaifengwang@gmail.com Perl Misc 13 08-20-2006 02:36 PM
Re: module docstring, documentation,anything? please note is the module type/object NOT some module Maric Michaud Python 0 06-24-2006 12:42 PM
MSI Installer Problem: can't install 2.4a2 on new install of Win2kSP2 Richard Hanson Python 13 08-31-2004 04:43 PM
Problem using ActiveState PPM to install module Irwin Friedman Perl 1 09-06-2003 10:57 PM



Advertisments