Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Problem running perl scripts

  1. #1

    Default Problem running perl scripts

    Came across an issue trying to install a tarball package (inspircd), when I run ./configure in the untar'd package dir I get 'permission denied'

    If I run ' perl configure' I don't get such a permission error and the configure script runs ok but that's as far as I can go with it as when I run 'make' makefile calls other perl scripts which will not run because of the same permissions issue

    Code:
    ecky@linux:~> whereis perl
    perl: /usr/bin/perl /usr/bin/X11/perl /usr/share/man/man1/perl.1.gz
    Anyone know how I can fix this so I can run scripts without needing to specify 'perl' i.e ./configure instead of 'perl configure', maybe a symlink to /usr/bin/perl in some other directory?

    I once had a similar issue where I had to put 'sh' in front of any bash scripts I ran but ********** if I can remember how I fixed it

  2. #2

    Default Re: Problem running perl scripts [SOLVED]

    Fixed that, lightbulb suddenly came on in my head and I changed the shebang at the start of all the .pl files. In the package, they originally had:

    Code:
    #! /usr/bin/env perl
    Which I changed to:

    Code:
    #! /usr/bin/perl
    in all the files and it then ran without a hitch

  3. #3
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,788
    Blog Entries
    14

    Default Re: Problem running perl scripts

    Maybe what you're looking for is already out there: software.opensuse.org: Search
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  4. #4

    Default Re: Problem running perl scripts

    Ecky wrote:
    > Fixed that, lightbulb suddenly came on in my head and I changed the
    > shebang at the start of all the .pl files. In the package, they
    > originally had:
    >
    >
    > Code:
    > --------------------
    > #! /usr/bin/env perl
    > --------------------
    >
    >
    > Which I changed to:
    >
    >
    > Code:
    > --------------------
    > #! /usr/bin/perl
    > --------------------
    >
    >
    > in all the files and it then ran without a hitch


    Right but the original form should have worked too! The first form is
    just as correct as the second form, in fact some would say it is more
    correct.

    What happens if you just run env?

    $ env

  5. #5

    Default Re: Problem running perl scripts

    Knurpht am not sure what I was meant to be looking for in a suse software search result for 'insp' mate


    Quote Originally Posted by djh-novell View Post
    What happens if you just run env?
    $ env
    Running env returns:
    Code:
    ecky@godzilla:~> env
    LESSKEY=/etc/lesskey.bin
    XDG_VTNR=7
    MANPATH=/usr/lib64/mpi/gcc/openmpi/share/man:/usr/local/man:/usr/share/man
    NNTPSERVER=news
    KDE_MULTIHEAD=false
    XDG_SESSION_ID=1
    DM_CONTROL=/var/run/xdmctl
    HOSTNAME=godzilla
    XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
    GPG_AGENT_INFO=/tmp/gpg-JL3BUJ/S.gpg-agent:2478:1
    TERM=xterm
    SHELL=/bin/bash
    HOST=godzilla
    HISTSIZE=1000
    XDG_SESSION_COOKIE=a5f47c8024f920264147a17f00001fa0-1352634175.679594-1592764949
    XDM_MANAGED=method=classic
    PROFILEREAD=true
    GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/ecky/.gtkrc-2.0:/home/ecky/.kde4/share/config/gtkrc-2.0
    KONSOLE_DBUS_SERVICE=:1.319
    TMPDIR=/tmp
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/ecky/.gtkrc:/home/ecky/.kde4/share/config/gtkrc
    GS_LIB=/home/ecky/.fonts
    WINDOWID=67108890
    MORE=-sl
    XSESSION_IS_UP=yes
    SHELL_SESSION_ID=452d8c3c4f394000b9235b304f645124
    GTK_MODULES=canberra-gtk-module
    KDE_FULL_SESSION=true
    USER=ecky
    JRE_HOME=/usr/lib64/jvm/jre
    LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:
    LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/openmpi/lib64
    XNLSPATH=/usr/share/X11/nls
    HOSTTYPE=x86_64
    FROM_HEADER=
    SESSION_MANAGER=local/godzilla:@/tmp/.ICE-unix/2561,unix/godzilla:/tmp/.ICE-unix/2561
    CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu
    COLUMNS=80
    PAGER=less
    CSHEDIT=emacs
    XDG_CONFIG_DIRS=/etc/xdg
    MINICOM=-c on
    DESKTOP_SESSION=kde-plasma
    PATH=/usr/lib64/mpi/gcc/openmpi/bin:/home/ecky/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games
    MAIL=/var/spool/mail/ecky
    CPU=x86_64
    QT_IM_MODULE=xim
    JAVA_BINDIR=/usr/lib64/jvm/jre/bin
    PWD=/home/ecky
    INPUTRC=/home/ecky/.inputrc
    XMODIFIERS=@im=local
    JAVA_HOME=/usr/lib64/jvm/jre
    LANG=en_GB.UTF-8
    KDE_SESSION_UID=1000
    PYTHONSTARTUP=/etc/pythonstart
    LINES=37
    KONSOLE_DBUS_SESSION=/Sessions/1
    GPG_TTY=/dev/pts/2
    QT_SYSTEM_DIR=/usr/share/desktop-data
    COLORFGBG=15;0
    SHLVL=2
    XDG_SEAT=seat0
    HOME=/home/ecky
    OSTYPE=linux
    KDE_SESSION_VERSION=4
    ALSA_CONFIG_PATH=/etc/alsa-pulse.conf
    SDL_AUDIODRIVER=pulse
    LANGUAGE=
    LESS_ADVANCED_PREPROCESSOR=no
    LS_OPTIONS=-N --color=tty -T 0
    XCURSOR_THEME=DMZ
    WINDOWMANAGER=/usr/bin/startkde
    LESS=-M -I -R
    G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252
    LOGNAME=ecky
    MACHTYPE=x86_64-suse-linux
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jzg24vp4Hb,guid=301709f0598eedb61834680700000019
    XDG_DATA_DIRS=/usr/share
    LESSOPEN=lessopen.sh %s
    USE_FAM=
    WINDOWPATH=7
    PROFILEHOME=
    XDG_RUNTIME_DIR=/run/user/ecky
    DISPLAY=:0
    QT_PLUGIN_PATH=/home/ecky/.kde4/lib64/kde4/plugins/:/usr/lib64/kde4/plugins/
    GTK_IM_MODULE=cedilla
    XAUTHLOCALHOSTNAME=godzilla
    LESSCLOSE=lessclose.sh %s %s
    QT_IM_SWITCHER=imsw-multi
    G_BROKEN_FILENAMES=1
    COLORTERM=1
    JAVA_ROOT=/usr/lib64/jvm/jre
    _=/usr/bin/env

    I'm not especially clever in this sort of area but I do know that the #! /usr/bin/env perl shebang _should_ work though I have read that it doesn't always, I seem to have a scenario where it doesn't and would be interested to learn why and how to fix it

  6. #6

    Default Re: Problem running perl scripts

    Ecky wrote:
    > I'm not especially clever in this sort of area but I do know that the
    > #! /usr/bin/env perl shebang _should_ work though I have read that it
    > doesn't always, I seem to have a scenario where it doesn't and would be
    > interested to learn why and how to fix it


    I'd like to ask you to show us the permissions for that configure file.
    But I'm interested in what the permissions were before you edited the
    files

    I'm guessing that now they have an executable bit, yes? But did they before?

  7. #7

    Default Re: Problem running perl scripts

    Freshly extracted from the tarball in original state:

    Code:
    -rwxr-xr-x 1 inspircd users 40953 Oct  6 23:29 configure
    My edited configure file:

    Code:
    -rwxr-xr-x 1 inspircd users 40953 Oct  6 23:29 configure

    The inspircd package isn't installed or run as root ... irc processes as root would be a bad idea!

  8. #8

    Default Re: Problem running perl scripts

    Ecky wrote:
    > Freshly extracted from the tarball in original state:
    >
    >
    > Code:
    > --------------------
    > -rwxr-xr-x 1 inspircd users 40953 Oct 6 23:29 configure
    > --------------------


    OK, so please show the full output from running ./configure using that file.

  9. #9

    Default Re: Problem running perl scripts

    Quote Originally Posted by djh-novell View Post
    OK, so please show the full output from running ./configure using that file.
    Weirdly, it now runs normally, both the original version and my edited one, something must have changed, during my efforts to fix the issue maybe

    Is it possible that when I 'manually' called perl it detected an error in it's configuration that it then corrected?

  10. #10

    Default Re: Problem running perl scripts

    Ecky wrote:
    > djh-novell;2503305 Wrote:
    >> OK, so please show the full output from running ./configure using that
    >> file.

    >
    > Weirdly, it now runs normally, both the original version and my edited
    > one, something must have changed, during my efforts to fix the issue
    > maybe


    Oh well, at least the universe is still unwinding as it should.

    > Is it possible that when I 'manually' called perl it detected an error
    > in it's configuration that it then corrected?


    It's not something I've ever heard of, but I guess we'll never know

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •