adding to $PATH environment variable
Results 1 to 7 of 7

Thread: adding to $PATH environment variable

  1. #1
    Senior Member
    Join Date
    May 2002
    Posts
    344

    adding to $PATH environment variable

    Alright so this has been driving me crazy and i havent been able to find an appropriate solution even after my searches. I am very new to Linux, and have just started using Cygwin. I recently have installed Perl2Exe, a program which converts a perl script into an executable. Anyways, i installed it properly (i think/hope), so that in my home directory there is a folder perl2exe which contains a bunch of files and folders and the executable perl2exe.exe. After I was unable to get the program working, I decided to email their tech support, who explained to me that i needed to "add the path to perl2exe.exe to your PATH enviroment
    variable." Wells turns out thats easier said than done for a Cygwin newbie. I have been screwing around for a while, but i just cant seem to add the path to perl2exe.exe to $PATH. Can anyone walk me through this or better yet just give me a piece of code needed to make this work?

    Code:
    set PATH = ($HOME/perl2exe/perl2exe.exe $PATH)
    This obviously doesnt or hasnt worked, so what am i doing wrong? Any help is much appriciated
    Support your right to arm bears.


    ^^This was the first video game which i played on an old win3.1 box

  2. #2
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    try either
    Code:
    export PATH=$HOME/perl2exe/:$PATH
    or
    Code:
    set PATH=$HOME/perl2exe/:$PATH
    export PATH
    You want the directory the executables are in in the path, not the executable itself.
    also, look for a file like .bash_profile, or .bashrc or /etc/profile to set that as part of your path automatically when you login.

  3. #3
    Senior Member
    Join Date
    May 2002
    Posts
    344
    I get it thanks a lot for explainning. Alright now unforunetly i ran into another problem... the error is with perl2exe and is as follows:

    Code:
    ERROR: Unsupported perl version 5.008007
    I guess this doesnt have anything to do with *.nix security, but thought i might just throw it out there. I guess i better just find someone who has an application that can turn PERL source code into an executable and pm them for a favor as this code isnt anything thats really special. Thanks again!
    Support your right to arm bears.


    ^^This was the first video game which i played on an old win3.1 box

  4. #4
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    I was looking for a perl2exe thing on my computer the other night and found perlcc which works like gcc for perl
    perlcc -o executable perlscript.pl
    You're doing this on cygwin right? I don't think you can make an executable on linux and have it run on windows. might work in cygwin though. Good luck.

  5. #5
    Senior Member
    Join Date
    May 2002
    Posts
    344
    hmm interesting... I think what i am going though is get a copy of macperl for my mac os 9 machine and just use that and forget about create an .exe for my windows machine too bad i am having such a pain in the ass trying to figure this out. I guess i could just purchase the activeperl IDE which is able to turn scripts into executables, but i really want to work in cygwin and learn more about linux. Thanks for the help.
    Support your right to arm bears.


    ^^This was the first video game which i played on an old win3.1 box

  6. #6
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    V7.02 Oct 18 2003
    Fixes some errors in handling of unicode
    Fixed: use Switch causes a crash
    Fixed: use Net::LDAP causes a crash - added support for seek on the DATA filehandle
    Fixed: Building Windows code on Unix says "ERROR: Unsupported perl version 5.008"
    Fixed: Reading DATA causes a crash
    Fixed: Reading END causes a crash
    Fixed: DBD::mysqlPP treats literl '?' as placeholder
    DBD::mysqlPP version upgraded to 0.04 from 0.03
    Fixed: suid application crashes
    http://www.indigostar.com/pxman.htm

    The most obvious question is: Are you using the latest version?
    It either has a bug, or there is something in your script that is
    not supported. Try a simpler script as a test.
    I came in to the world with nothing. I still have most of it.

  7. #7
    Senior Member
    Join Date
    May 2002
    Posts
    344
    Code:
    Fixed: Building Windows code on Unix says "ERROR: Unsupported perl version 5.008"
    I have been getting that error which is wierd because i am using the latest version of their software. Anyways, because i am using Cygwin, i decided to abandon the idea of installing and getting perl2exe to work on Linux and rather just focus on getting it to work for windows. I have installed it, but when i run it, it seems to run fine until the time comes to copying the perl file and create an executable. The error looks something like this:

    Code:
    Converting 'perlfile.pl' to perlfile.exe 
    Can't open perlfile.pl
    I know this is the *.nix forum so like i said earlier, but i just wanted to let you all know what my current situation is. 'perlfile.pl' is located within the same folder as perl2exe.exe and when i try to run perl2exe with all the other sample files included in the perl2exe folder, i get the same error informing me that perl2exe is unable to open my perl file. Anyways, thanks again, guess i will just contact the customer support line tomarrow!

    EDIT--
    How annoying, i got perl2exe to work once under Cygwin and i was able to create an executable, except it didnt like the use of Data:umper which i had forgotten to remove prior to creating the executable. Anyways, it only has worked once for no special reason at all. I dont get it at all, i swear i didnt change anything
    Support your right to arm bears.


    ^^This was the first video game which i played on an old win3.1 box

Posting Permissions

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