Find the answer to your Linux question:
Results 1 to 7 of 7
Hello, I am having a tough time executing files in Mandrake. Even after I run chmod +x on some files, execution doesn't work. For example: files like INSTALL* or configure* ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    42

    Executables in Mandrake


    Hello,

    I am having a tough time executing files in Mandrake. Even after I run chmod +x on some files, execution doesn't work. For example: files like INSTALL* or configure* should work but they don't. Could somebody please tell me how to make the executables work?

    Thank you,
    Victor.

  2. #2
    Just Joined!
    Join Date
    Nov 2004
    Posts
    18
    Make sure that you have done a cd to the directory that contains the configure file and type ./configure. Or type the full path that leads to the file that you want to execute. For example if you had and executable callled install.bin in a directory under your home directory called mydirectory . You would type home/mydirectory/install.bin. Or place the executable somewhere in your PATH ie usr/bin , or usr /sbin/ Hope this helps.

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Posts
    42

    Executables in Mandrake

    Hello,

    Thank you for your reply. You were right, I ran ./config and it did (unpack?) the Apache 2 files I've download. BUT, I am still having difficulty executing simple executable files. For example, I've downloaded a Flash Player plugin and was trying to run: flashplayer-installer, but I got the error "bash: flashplayer-installer: command not found". I got the same problem while running javac* in its /jdk1.5.0_02/bin directory and any other file that's supposed to be executable. Any ideas how to fix this?

    Thank you,
    Victor.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220
    I hope you are NOT forgetting the "./" part ...

    you shud always use ./ in front of any executable .. if they are not in PATH ie.

    for eg. ,

    $ cd /opt/jdk1.5.0/bin
    $ ./javac
    or
    $ ./java --version

  6. #5
    Just Joined!
    Join Date
    Mar 2005
    Posts
    42

    Executables in Mandrake

    Hi,

    Thank you so much for your reply. Holly cow! I was forgetting ./ in front of executables! I think I'll need a good tutorial on Linux. I puzzled though as to why when I ran commands like "gcc" I didn't need to put ./ in front of them. Do you know any good Linux/Unix tutorials? Thank you very much for your help.

    Victor.

  7. #6
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220
    The reason why you do not need ./ in front of gcc or other common executables is because they are already in the PATH environment variable.
    The point is any shell ( maybe BASH, or CSH, or TSH ) has its own environment variables. Most of us use BASH.
    The BASH shell has a environment variable called PATH. this implies the paths of the directories in which the shell will search for executables if you DO NOT give "./" or the absolute path.

    for eg.,
    on my system,

    $ echo $PATH
    /usr/java/j2sdk1.4.0_01/bin/:/usr/local/alliance/archi/Linux/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/X11R6/bin:/usr/games:/opt/SUNWspro/bin:/opt/sfw/bin:/opt/sfw/lib:/usr/ccs/bin
    $

    as you can see, these are various directory paths separated by ":".
    if you give
    $ whereis gcc

    output will be something like this :
    gcc: /usr/bin/gcc /usr/share/man/man1/gcc.1.bz2

    the "gcc" executable is located in /usr/bin on my system.
    you will further note that /usr/bin is present in the PATH variable.

    so when you just type "gcc" and hit enter, the shell first searches for "gcc" in all the directories specified by PATH, finds it in /usr/bin, then executes it.
    In your javac case, you could not do it because the jdk bin directory was not in your PATH. you may note that at the front of my PATH, there is a /usr/java/j2sdk1.4.0_01/bin/. You will have to add something similar to the PATH variable, so that you can invoke java or javac from anywhere.

  8. #7
    Just Joined!
    Join Date
    Mar 2005
    Posts
    42

    Executables in Mandrake

    Hi,

    Thank you very much for your reply. I'll copy your message for further study.

    Thank you,
    Victor.

Posting Permissions

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