LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can get Bastille to run. (https://www.linuxquestions.org/questions/linux-software-2/can-get-bastille-to-run-71680/)

chrisknight 07-10-2003 06:10 PM

cant get Bastille to run.
 
I have RH9/KDE3.1.
I have installed the perl-Curses RPM and perl-Tk from ATRPM RPM and also the Bastille RPM itself.
from:
http://www.bastille-linux.org/#get
and
http://www.bastille-linux.org/perl-rpm-chart.html
But when I pull up my bash shell & type "bastille" I get this output:

[root@cd1 root]# bastille
WARNING: /usr/bin/perl cannot find Perl module Tk.
The above module(s) is/are required to correctly display
the Bastille User Interface. If you are unable to find a
pre-compiled module for your OS, they can be found at:
http://www.cpan.org/modules/01modules.index.html
If you installed the modules in another installation of
perl besides the one listed in the error message, you may
override Bastille's search path by setting the
$CORRECT_PERL_PATH environment variable to the directory
that the desired perl binary is located in.

[root@cd1 root]#

I did install the Perl Module Tk.

What gives?

unSpawn 07-11-2003 05:49 PM

Thanks for providing the package information to go with your question, that definately is a usefull approach. I am however not able to troubleshoot this question in a direct fashion, because it doesn not contain error messages or otherwise indication of what could be wrong.

Did you get any error messages during the install of the RPM's?
Did you set, or check, the CORRECT_PERL_PATH environment variable (as root, type "env") as offered?
Did you try accessing Bastille from a root console (not a terminal in X)?

//moderator.note: since you crossposted your message, and this not being a security issue but a software, I'm gonna transfer it to Linux - Software. Please do *not* crosspost.

chrisknight 07-12-2003 07:18 AM

OK...
I did not have any errors when installing the RPM's.
I changed /etc/inittab to run level 3 then rebooted...
I logged in at the prompt, typed "bastille" & got the exact same error message as the shell within X.
Changed the run level back to 5 with vi & ran "env" ... output:
[root@cdc1 root]# env
KDE_MULTIHEAD=false
SSH_AGENT_PID=2567
HOSTNAME=cdc1.redstarnetworks.com
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc:/root/.gtkrc-kde
GS_LIB=/root/.kde/share/fonts
USER=root
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi= 01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00 ;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz =00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;3 5:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
SSH_AUTH_SOCK=/tmp/ssh-XXf9EtzI/agent.2507
SESSION_MANAGER=local/cdc1.redstarnetworks.com:/tmp/.ICE-unix/2652
USERNAME=root
KONSOLE_DCOP=DCOPRef(konsole-2701,konsole)
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
MAIL=/var/spool/mail/root
KONSOLE_DCOP_SESSION=DCOPRef(konsole-2701,session-1)
PWD=/root
INPUTRC=/etc/inputrc
XMODIFIERS=@im=none
LANG=en_US.UTF-8
GDMSESSION=Default
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=3
HOME=/root
BASH_ENV=/root/.bashrc
LOGNAME=root
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=:0.0
G_BROKEN_FILENAMES=1
COLORTERM=
XAUTHORITY=/root/.Xauthority
_=/bin/env
[root@cdc1 root]#

Pardon my ignorance, how do I set, or check, the CORRECT_PERL_PATH environment variable.

chrisknight 07-12-2003 08:30 AM

ok... I opened up the bastille script and found $CORRECT_PERL_PATH...
It says:

PERL_PATHS="$CORRECT_PERL_PATH /opt/perl/bin /usr/bin /bin $PARSED_PATH"

On my system, perl is in /usr/bin

So it is fine, right?

unSpawn 07-12-2003 10:01 AM

Yes, it is. Could you run "sh -x /usr/sbin/bastille -n 2>&1>/tmp/bast.log" from the commandline and look at it?
This will run the bastille Bash script in debug mode, not prompt for the disclaimer, and output both stdout and stderr into the file /tmp/bast.log. What we're looking for are Perl @INC include path errors. Also try supplying the "-c" for selecting Curses if you're in X, because it will detect X and select Tk automagically.

If you're not familiar with debugging Bash shell scripts, you can post /tmp/bast.log, it'll be about 60 lines.

Just to be complete, if you need to set CORRECT_PERL_PATH, then do "export CORRECT_PERL_PATH=/usr/bin", and to check it's set run env|grep ^CORR.

chrisknight 07-12-2003 01:45 PM

I pulled up bash in x and did a "bastille -c" and it fired right up with no problems.

Thanks.

ktambascio 07-17-2003 08:33 AM

I'm having the same problem. I installed a Perl-Tk rpm, and there is a Tk.pm and TK directory in /usr/lib/perl5/5.8.0. Here is my bast.log: (This is Redhat 9)

+ export PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/kevin/bin
+ PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/kevin/bin
+ export PERL5LIB=:/opt/sec_mgmt/bastille/lib:/usr/lib/perl5/site_perl:/usr/lib/Bastille:/usr/lib/perl5/site_perl/5.6.0/i386-linux:/usr/lib/perl5/5.8.0:/usr/lib/perl5/vendor_perl
+ PERL5LIB=:/opt/sec_mgmt/bastille/lib:/usr/lib/perl5/site_perl:/usr/lib/Bastille:/usr/lib/perl5/site_perl/5.6.0/i386-linux:/usr/lib/perl5/5.8.0:/usr/lib/perl5/vendor_perl
+ set +o privileged
+ MIN_V_MAJ=5
+ MIN_V_MIN=005
++ echo /bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/kevin/bin
++ sed -e 's/:/ /g'
+ PARSED_PATH=/bin /usr/bin /usr/sbin /usr/local/bin /usr/bin /bin /usr/X11R6/bin /home/kevin/bin
+ PERL_PATHS=/usr/lib/perl5/5.8.0 /opt/perl/bin /usr/bin /bin /bin /usr/bin /usr/sbin /usr/local/bin /usr/bin /bin /usr/X11R6/bin /home/kevin/bin
+ ERRORWARN=WARNING:
+ ERRSPACES=
+ retval=0
++ PATH=/usr/bin:/bin
++ id -u
+ '[' 0 -ne 0 ']'
+ '[' -f /opt/sec_mgmt/bastille/bin/bastille ']'
+ '[' -f /usr/sbin/InteractiveBastille ']'
+ scripts_location=/usr/sbin
+ '[' '!' -x /usr/lib/perl5/5.8.0/perl ']'
+ FOUND=no
+ '[' '!' -x /opt/perl/bin/perl ']'
+ FOUND=no
+ '[' '!' -x /usr/bin/perl ']'
+ FOUND=yes
+ break
+ '[' yes = no ']'
++ /usr/bin/perl -version
++ head -2
++ sed -e 's/^v//'
++ grep '^[1-9]\.'
++ sed -e s/_/./
++ tr ' ' '\n'
+ PERL_VERSION=5.8.0
+ PERL_V_MAJ=5
+ PERL_V_NOTMAJ=8.0
+ PERL_V_MIN=8
+ PERL_V_PL=0
+ '[' 5 -eq 5 -a 8 -lt 005 -o 5 -lt 5 ']'
+ option_used=0
+ options_left=
+ runcmd=/usr/bin/perl /usr/sbin/InteractiveBastille
+ needx=yes
+ optarg=no
++ echo -n
++ grep -E '^-'
+ option_test=
+ '[' no = yes -a -z '' ']'
+ optarg=no
+ options_left= -n
+ '[' yes = yes ']'
+ missingmod=0
+ /usr/bin/perl -MTk
+ '[' 255 '!=' 0 ']'
+ retval=2
+ '[' 0 = 0 ']'
+ missingmod=1
+ echo 'WARNING: /usr/bin/perl cannot find Perl module Tk.'
WARNING: /usr/bin/perl cannot find Perl module Tk.
+ '[' 1 = 1 ']'
+ cat
The above module(s) is/are required to correctly display
the Bastille User Interface. If you are unable to find a
pre-compiled module for your OS, they can be found at:
http://www.cpan.org/modules/01modules.index.html
If you installed the modules in another installation of
perl besides the one listed in the error message, you may
override Bastille's search path by setting the
$CORRECT_PERL_PATH environment variable to the directory
that the desired perl binary is located in.


+ '[' 2 '!=' 0 ']'
+ exit 2

directory contents:

[root@fileserver 5.8.0]# pwd
/usr/lib/perl5/5.8.0
[root@fileserver 5.8.0]# ls
abbrev.pl Class filetest.pm newgetopt.pl tainted.pl
AnyDBM_File.pm complete.pl FindBin.pm NEXT Term
assert.pl constant.pm finddepth.pl NEXT.pm termcap.pl
Attribute CPAN find.pl open2.pl Test
attributes.pm CPAN.pm flush.pl open3.pl Test.pm
auto CPAN.pm.links ftp.pl open.pm Text
AutoLoader.pm ctime.pl getcwd.pl overload.pm Thread
AutoSplit.pm DB.pm Getopt perl5db.pl Thread.pm
autouse.pm Devel getopt.pl PerlIO Tie
B diagnostics.pm getopts.pl PerlIO.pm Time
base.pm Digest.pm Hash pod timelocal.pl
Benchmark.pm DirHandle.pm hostname.pl Pod Tk
bigfloat.pl dotsh.pl I18N pwd.pl Tk.pm
bigint.pl Dumpvalue.pm i386-linux-thread-multi Scalar Unicode
bigint.pm dumpvar.pl if.pm Search unicore
bignum.pm Encode importenv.pl SelectSaver.pm UNIVERSAL.pm
bigrat.pl English.pm integer.pm SelfLoader.pm User
bigrat.pm Env.pm IO Shell.pm utf8_heavy.pl
blib.pm exceptions.pl IPC shellwords.pl utf8.pm
bytes_heavy.pl Exporter less.pm sigtrap.pm validate.pl
bytes.pm Exporter.pm List sort.pm vars.pm
cacheout.pl ExtUtils Locale stat.pl vmsish.pm
Carp fastcwd.pl locale.pm strict.pm warnings
Carp.pm Fatal.pm look.pl subs.pm warnings.pm
CGI fields.pm Math Switch Win32.pod
CGI.pm File Memoize Switch.pm
CGI.pm.newcgi FileCache.pm Memoize.pm Symbol.pm
charnames.pm FileHandle.pm Net syslog.pl

Thanks,
Kevin


All times are GMT -5. The time now is 04:09 AM.