1. GCC _ no command found - Ubuntu 7.10 (Juan Pablo Quiroga)<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Date: Mon, 27 Aug 2012 08:23:31 +1000<br>

From: Juan Pablo Quiroga <<a href="mailto:juaquiroga@gmail.com">juaquiroga@gmail.com</a>><br>
To: <a href="mailto:ubuntu-au@lists.ubuntu.com">ubuntu-au@lists.ubuntu.com</a><br>
Subject: GCC _ no command found - Ubuntu 7.10<br>
Message-ID:<br>
        <<a href="mailto:CAAHz4PiWCpeKXR04GKb31bOBFHmjyERUfz%2BBsWUxpPKf1z6v5Q@mail.gmail.com">CAAHz4PiWCpeKXR04GKb31bOBFHmjyERUfz+BsWUxpPKf1z6v5Q@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Heya Guys,<br>
<br>
I hope your weekend would have been great,<br>
<br>
Guys, I'm having some issues with my gcc. I'm running a new backup solution<br>
for that server but it can't be updated to a new Ubuntu versions so having<br>
said that, when I run gcc -v --> No command found and I gave a try to<br>
install it again apt-get install gcc --> the package has already been<br>
installed, I'm not sure why I'm having this behaviour, please advise.<br>
<br>
Cheers,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
~~!Juan Pablo!~~<br>
<br></font></span></blockquote><div><br></div><div>Hi Juan</div><div><br></div><div>The number 1 possibility is that your path does not reference the location of the gcc executable. </div><div><br></div><div>So do an echo $PATH (as root, logged in as the root user or via su - (with dash -)).. The $PATH is a list of directories that will be searched for executable programs. </div>
<div><br></div><div>ok do a which gcc? does anything get returned? </div><div><br></div><div>If not (or gcc -v does not work as root). do a slocate -u and then locate gcc (or a cd / ; find ./ -name "gcc"). </div>
<div><br></div><div>If gcc is on your system like in /usr/whatever/sbin/gcc you can add it to your path. PATH=$PATH:/usr/whatever/sbin Keep in mind any executable files in that directory will be executed. (this wont survive a reboot). </div>
<div><br></div><div>If gcc is not on your system. Then you need to either install it or reinstall it. </div><div><pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<code style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif">apt-file search filename</code></pre>
<pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<code style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif">
<pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<code style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif">apt-file search /path/to/file</code></pre>
<pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
quote "</pre></code><a href="http://superuser.com/questions/10997/find-what-package-a-file-belongs-to-in-ubuntu-debian">http://superuser.com/questions/10997/find-what-package-a-file-belongs-to-in-ubuntu-debian</a>"
</pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<br></pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
once you know the package. apt-get install --reinstall packagename</pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<br></pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
Good luck. </pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<br></pre><pre style="margin-top:0px;margin-bottom:10px;padding:5px 5px 5px 10px;border-width:0px 0px 0px 5px;border-left-style:solid;border-left-color:rgb(204,204,204);font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
Colin McDermott</pre></div></div>