| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: May 12, 2010
Posts: 5
![]() |
Hi guys,
I'm trying to install a 'pre-compiled binary release' through terminal. Basically I am being told to move the files 'cufflinks' and 'cuffcompare' binaries in your PATH environment variable. So my question is what is the PATH environmental variable? And how do I move these files to that? I have looked elsewhere for the answer however I haven't found a suitable answer so far. Sorry for the newbie question. Thanks very much, JP |
| QUOTE Thanks | |
![]() Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
|
It sounds like what you are being told is to add the path where cufflinks and cuffcompare are located to your PATH environment variable. This is done so that you can just type either of those names in the Terminal and the system can find them and execute them. Otherwise you have to type the full path to execute those executables.
How you set the path is dependent on the shell being used. The default shell for OS X is now Bash. To add a path to the PATH environment variable is done like this; Code:
export PATH=$PATH:/Users/Shared Do a 'man bash' in the Terminal and look under the 'INVOCATION' section. You'll note that if you add your export command to one of three possible login shell files, that you will not have to type that command every time you start the shell. CameraTime - Time lapse photography for novice and advanced users. When asking questions, post the version of your software. You'll receive better answers. Please post your results to the thread as it is good feedback.
|
| QUOTE Thanks | |
![]() Member Since: Dec 13, 2007
Location: United States of America
Posts: 256
![]() Mac Specs: 2.1GHz MacBook with 4GB RAM, Mac OS X 10.6, iLife and iWork ‘09
|
To figure out where a binary is, you can use the which command. For example, typing which ls should return something like /bin/ls, which means that if you were to navigate to the /bin directory, you'd see the ls program within. To see the list of locations that are currently set for $PATH, you can type echo $PATH at the command-line. It will return a list of directories (folders) separated by colons; these are the locations that will be checked in when you type a command name. In your case, you could copy those programs to a place like /usr/bin by typing the following command: Code:
sudo cp program_name /usr/bin/ — Alternatively, if you don't want to mess with using the sudo command (which you should always be extremely careful with), you can add a new directory to your $PATH, from which you'll be able to run commands in the future. To do this, you need to edit either .bashrc or .bash_profile. For example, type Code:
open -a TextEdit ~/.bash_profile Code:
export PATH=$PATH:/new/directory Code:
export PATH=$PATH:/Users/your_username/Programs Once you add that line to the file, save it and close it. For the change to take effect, type Code:
source ~/.bash_profile — There's one final thing worth saying. If you only want to run a program once, you can navigate to the directory containing it and type the command name preceded by a period and a slash (./) to run the program regardless of whether the containing folder is in your $PATH or not. As an example, if your cuffs program is in your Downloads folder, typing the following two commands would run it a single time: Code:
cd ~/Downloads ./cufflinks Hopefully that little overview will help you out. If you want to find out more, search for "bash path" on a search engine and you should get relevant results.
|
||||
| QUOTE Thanks | |||||
![]() Member Since: May 12, 2010
Posts: 5
![]() |
Thanks guys I managed to move the files prity successfully. Have got myself a UNIX book now aswell.
I have another problem now though: I am trying to install another program it tells me to do this: "To install TopHat, unpack the tarball and change to the package directory as follows: tar zxvf tophat-1.0.7.tar.gz cd tophat-1.0.7/ Now build the package: ./configure --prefix=/path/to/install/directory/ make Finally, install TopHat: make install" I have tried to do this however it says there aren't the commands configure and make. I'm running bash on OS X Leopard on my Macbook Pro. Are 'make' and 'configure' not the commands used in bash? Thanks, James |
| QUOTE Thanks | |
![]() Member Since: Jan 12, 2009
Location: Prague, Czech Republic
Posts: 1,096
![]() ![]() Mac Specs: 2,4Ghz 15" unibody
|
Download Xcode - Apple Developer It can also be found on your Install Discs |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,308
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
scathe is correct. You will need to install the Xcode developer tools to get all the tools you need to build programs. As scathe mentioned, take a look at your install discs or download it from Apple's developer website.
Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
![]() Member Since: Jan 12, 2009
Location: Prague, Czech Republic
Posts: 1,096
![]() ![]() Mac Specs: 2,4Ghz 15" unibody
|
ok hold it, is there even a "configure" command? U sure it doesn't just refer to a file in the current directory with the name "configure"?
maybe it's just a file that doesn't have execute permissions? to add the execute permission run: chmod +x filename in this case chmod +x ./configure first check if such file exists of course |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,308
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
scathe is again correct - configure isn't a command/program but is a file included with many programs distributed as source. You need to execute it as such: ./configure. The ./ at the beginning signifies that the command is going to be executed from the current directory.
Note what you posted earlier: Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| setting path on OS | greisen | OS X - Apps and Games | 0 | 08-31-2009 07:45 PM |
| Network path to windows machine on network | jdmcm | Internet, Networking, and Wireless | 0 | 11-12-2008 01:43 PM |
| File path "Save As" Dialog box | curiouslearn | Switcher Hangout | 2 | 10-09-2008 09:22 PM |
| Full path is not showing up correctly in address bar | mac_min | Web Design and Hosting | 0 | 02-28-2008 11:23 AM |
| how can i set the path? | Bo Eddy | OS X - Development and Darwin | 1 | 05-12-2004 10:45 AM |
All times are GMT -4. The time now is 04:35 PM.
Powered by vBulletin