LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-17-2011, 04:09 PM   #1
princebadshah
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Rep: Reputation: Disabled
Basic prob regarding permission setting and Path


Hello
I am finding following 2 prob
1 : in writing terminal in ubuntu
root@ubuntu:/home/elysium# gcc
The program 'gcc' can be found in the following packages:
* gcc
* pentium-builder
Try: apt-get install <selected package>
root@ubuntu:/home/elysium# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 284 not upgraded.
root@ubuntu:/home/elysium# gcc
The program 'gcc' can be found in the following packages:
* gcc
* pentium-builder
Try: apt-get install <selected package>


Prob 2 : I want to edit /.bashrc but

root@ubuntu:/home/elysium# ~/.bashrc
/root/.bashrc: line 6: return: can only `return' from a function or sourced script


thanks in advance for your help ...!!!
 
Old 12-17-2011, 04:20 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
1. What is output with: gcc -v

2. Normal, you edit a file with a text editor not directly by typing its filename in the shell
try: nano ~/.bashrc
 
Old 12-17-2011, 04:25 PM   #3
princebadshah
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
thanks for your quick reply

1: root@ubuntu:/home/elysium# gcc -v
The program 'gcc' can be found in the following packages:
* gcc
* pentium-builder
Try: apt-get install <selected package>

2: this is Working now .. thanks but still prob 1 unsolved

Last edited by princebadshah; 12-17-2011 at 04:47 PM.
 
Old 12-17-2011, 04:46 PM   #4
princebadshah
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Adding little more information ...


elysium@ubuntu:~$ whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz
elysium@ubuntu:~$ gcc
The program 'gcc' can be found in the following packages:
* gcc
* pentium-builder
Try: sudo apt-get install <selected package>
elysium@ubuntu:~$ sudo su
[sudo] password for elysium:
root@ubuntu:/home/elysium# gcc
The program 'gcc' can be found in the following packages:
* gcc
* pentium-builder
Try: apt-get install <selected package>
 
Old 12-17-2011, 06:23 PM   #5
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Try sudo su -
That is put a space and a hyphen behind the su
Then try again.
 
Old 12-18-2011, 01:37 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Hello prince,

Try install using :

Quote:
#sudo apt-get install gcc
&

Quote:
#sudo apt-get install gcc-snapshot
above both commands will ask you root password, give the root password and go on.

or

Have a look at this URL. I installed gcc-4.4 (and g++-4.4) from there, which seem to be the most official group of hackers that actually put gcc-4.4 into an ubuntu .deb. Till now running without problems :

https://launchpad.net/~ubuntu-toolchain/+archive/ppa

or

Try this one:

Quote:
#sudo apt-get install g++
This will install both gcc and g++

Last edited by Satyaveer Arya; 12-18-2011 at 01:42 AM.
 
Old 12-18-2011, 06:13 AM   #7
princebadshah
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Still same error, installing with apt-get tells is is already there but when i query gcc it says find it gcc package, I was updating /.bashrc file and put a PATH variable there, may be this is the problem, but I deleted that path again , I dont know why it is so. In fact it is same for cc and other lib as well ...
 
Old 12-20-2011, 04:36 AM   #8
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Lightbulb



remove , then reinstall

apttitude remove --purge gcc

# Use Purge to clear any config files.

aptitdude install gcc
 
1 members found this post helpful.
Old 12-20-2011, 11:05 AM   #9
princebadshah
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Yeah I did the same but used ubuntu software centre, then reinstall. Now working

thanks ...
 
Old 12-23-2011, 10:35 AM   #10
princebadshah
LQ Newbie
 
Registered: Dec 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
sudo dpkg -r gcc

sudo apt-get -f autoremove

sudo apt-get install gcc

sudo apt-get update

This is exactly i was looking for
 
Old 12-23-2011, 12:12 PM   #11
ochienged
Member
 
Registered: Oct 2007
Location: Plano, TX
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 70

Rep: Reputation: 26
You may want to search you repositories for gcc, it might be referred a little differently

Try,
Quote:
apt-cache search gcc
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
gambas BASIC IDE prob with examples package Crito Fedora 3 01-03-2006 11:28 PM
Usb and other hardware permission prob artois_val Mandriva 1 09-30-2005 02:21 PM
basic pointer prob. jnusa Programming 6 01-13-2005 02:42 PM
ftp up/download permission prob Stex Linux - Networking 6 10-03-2003 01:23 PM
permission prob crater Linux - Newbie 7 12-13-2002 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration