LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-01-2006, 06:55 PM   #1
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Rep: Reputation: 15
Set Path


I am trying to install a gcc compiler.

I set my path in my home directory:

/home/pedro/.bash_profile

like so

PATH=$PATH:/usr/lib/gcc
export PATH,

Is this correct and is this the right file to edit?

Thanks
 
Old 08-01-2006, 08:31 PM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
That is the correct way to set the $PATH environment variable.

However, to install the gcc compiler, simply use:
Code:
sudo aptitude install build-essential
The above will install gcc and the required libraries to compile most software, along with other utilities such as make, and place the executeables in a suitable place so you don't need to edit your $PATH.

I hope this helps
--Ian
 
Old 08-02-2006, 12:29 PM   #3
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Original Poster
Rep: Reputation: 15
gcc

Thanks that worked. I am not familiar ith the command you gave: sudo aptitude install build-essential.

In what folder is this comman d pulling the programs from?


Thanks
 
Old 08-02-2006, 11:12 PM   #4
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Most linux distros have a package manager, that will download and install programs and their dependencies for you. On Debian based distros, such as Ubuntu, this is called apt.

Aptitude is a frontend to apt (see http://www.psychocats.net/ubuntu/aptitude.php for more about aptitude and apt-get). Other frontends include apt-get, and Synaptic (GUI).

You define a list of repositories, in /etc/apt/sources.list. The package manager will fetch a list of all the packages available in each repository, and store it. When you request a package to be installed, it finds a suitable repository and downloads and installs the program. It also fetches and installs any other packages that your requested packages requires.

I hope this helps
--Ian
 
Old 08-03-2006, 01:01 PM   #5
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
You may find System-> Administration-> Synaptic Package Manager as an simpler GUI path for installing. Command line works but isn't required for installs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't set PATH gsrichmo Linux - Software 6 07-16-2005 01:21 PM
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 12:24 AM
How to set PATH How do I set PATH environment variable? Tranquil Linux - Newbie 3 11-02-2003 02:52 AM
$PATH!? how to set these PATH(s)!? sirpelidor Red Hat 5 10-25-2003 04:00 PM
WHERE should you set PATH? Ethan Linux - General 3 09-20-2002 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration