Module install problem DBD::Unify


J

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

[[email protected]]$ perl Makefile.PL
[[email protected]]$ 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.
 
Ad

Advertisements

J

Justin C

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.
 
E

ela

Justin C said:
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?
 
J

Justin C

Quoth Justin C said:
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

[[email protected]]$ perl Makefile.PL
[[email protected]]$ 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.
 
Ad

Advertisements

J

Justin C

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top