LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-07-2004, 06:40 PM   #1
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Rep: Reputation: 15
gcc: command not found


Hi, trying to learn how to write a shell scripts but when I go to compile:

[bob@jekyll]$ gcc first.c

I get:

-bash: gcc: command not found

I did

[bob@jekyll]$ rpm -qa | grep gcc

and got

compat -gcc-c++-7.3-2.96.118
libgcc-3.2.2-5
compat-gcc-7.3-2.96.118

so gcc is there but no compile?
ah gcc is not installed duh! so go to add/remove add select development tools, RH checks dependencies and says...

"krb5-1.2.7-10 and openssl-0.9.7a-2 could not be found on the system"

I find the .rpm's at redhat and download. The openssl.rpm downloads and starts to install when a message box appears stating that

"newer version of openssl is already installed"???

I dowload and open the krb5 package and get the same message.

What gives? this is like windows problems.

any help appreciated.

Bob



any help appreciated.

Bob

Last edited by BobNz; 04-07-2004 at 07:36 PM.
 
Old 04-07-2004, 08:19 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Most system admin tasks must be done as root.

To change to the full root account (system administrator), if you are running X, open an x terminal and use these commands from your user account. Note the change in the prompt. You can do the same from a virtual terminal as well, but you can't open an x terminal to do so.
Code:
[fancy@tinwhistle fancy]$ su -
Password: <give root password and press enter>
[root@tinwhistle root]#
Remember, now whatever you command in root (it's the "god" mode. You can bless or destroy at your whim) usually gets done if enough system is left to carry out the command. Sit on your hands and read the commands you type at least 3 times before pressing the enter key when in root.

Handy bash commands for finding out stuff in Linux:
# Find CPU specifications
cat /proc/cpuinfo

# Find running kernel version
uname -r

# What compiler version do I have installed
gcc -v
gcc --version

# What is the running kernel and compiler installed
cat /proc/version

Try downloading and installing the two rpms for apt4rpm linked below. Then command:
apt-get --fix-broken -y update
apt-get install synaptic

Run synaptic and try installing stuff with that.

# Red Hat links
Red Hat Linux Manuals
Get your mp3 support here
Maximum RPM
rpmfind
Easier software management: apt4rpm - Red Carpet
Red Hat 8.0 Tips & Tricks

# Red Hat 7.3 down configuration commands
setup leads to several configuration tools

# Red Hat 7.3 up configuration commands
Configure soundcard:
redhat-config-soundcard
Configure X server:
redhat-config-xfree86
Configure network:
redhat-config-network
Manage software:
redhat-config-packages
Red Hat Linux 8.0 Package Management Tool
Red Hat 9.0 Package Management Tool
Manage users
redhat-config-users

# Handling NTFS
New Technology FileSystem (NTFS) HOWTOs
Linux NTFS project

# Guides to software management
LNAG - How do I install a program I downloaded from the Internet?
Rute Guide's software explanation
You might want to check out CheckInstall to manage source code installations/uninstallation

Last edited by fancypiper; 04-07-2004 at 08:23 PM.
 
Old 04-08-2004, 12:05 AM   #3
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Original Poster
Rep: Reputation: 15
Thanks, bit of information overload

d/loaded apt an ran that from commandline; synaptic installed but cant get it to run.

took all the krb5 packages and openssl packages from the rh9.0 cds and installed but still get the same message saying that to install the development tools I need krb5-libs and openssl.

take back what I said about this being like windows this is worse!%$#@@

but thanks for your reply

Bob
 
Old 04-08-2004, 12:59 AM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Why are you trying to compile a shell script?
 
Old 04-08-2004, 01:25 AM   #5
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Original Poster
Rep: Reputation: 15
I,m not, i,m trying to compile first.c program the "hello world" its the forerunner to shellscripts in the text i,m using.

Bob
 
Old 04-08-2004, 10:21 AM   #6
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Strange, you should find a link for it in system tools in gnome and you should be able to launch it from the xterminal you were running..

Qpen an x terminal and use these commands from your user account. Note the change in the prompt. You can do the same from a virtual terminal as well, but you can't open an x terminal to do so.
Code:
[fancy@tinwhistle fancy]$ su -
Password: <give root password and press enter>
[root@tinwhistle root]# synaptic
If it doesn't launch, copy and post the errors.
 
Old 04-08-2004, 04:19 PM   #7
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Original Poster
Rep: Reputation: 15
Hi, heres what happened...

[bob@jekyll bob]$ su -
Password:
[root@jekyll root]# synaptic
-bash: synaptic: command not found
[root@jekyll root]#

The synaptic rpm is "synaptic-0.47-10.rh9.at.i386.rpm"
which i'm fairly sure is the one for me. I'm running rh9.0 on a p3 800.

When I do [bob@jekyll bob]$ rpm -qa | grep -i krb5 it returns krb5-1.2.7-14 which is the last release same with openssl it seems there must be something in the development tools that is dependent on the earlier version krb5-1.2.7-10 and the earlier version of openssl. That would explain why the packet manager says the earlier versions "can't be found" and are needed.

Bob

Last edited by BobNz; 04-08-2004 at 04:29 PM.
 
Old 04-08-2004, 04:28 PM   #8
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Original Poster
Rep: Reputation: 15
Hi again this is what happens when I try to install synaptic using apt...

[root@jekyll root]# apt-get install synaptic
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package synaptic
[root@jekyll root]#

I have the synaptic .rpm in a rpm folder on my desktop however when I do...
[root@jekyll root]# rpm -qa | grep -i synaptic
[root@jekyll root]#
nothing gets returned?

where is apt looking?
should I have the rpm folder somewhere else?

so to install I right clicked on package and clicked install package from the drop down
and the little system update window flashed on and off. Which I assume means synaptic was installed.

Bob

thanks for your time and help.

Last edited by BobNz; 04-08-2004 at 04:32 PM.
 
Old 04-08-2004, 04:32 PM   #9
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Did you do

apt-get update

first in order to make apt aware of all the sources and updates available on the internet?

See:

man apt-get

Last edited by fancypiper; 04-08-2004 at 04:34 PM.
 
Old 04-08-2004, 04:33 PM   #10
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Original Poster
Rep: Reputation: 15
Yes apt did its thing

Did it again...

[root@jekyll root]# apt-get update
Reading Package Lists... Done
Building Dependency Tree... Done
[root@jekyll root]#


bob

Last edited by BobNz; 04-08-2004 at 04:34 PM.
 
Old 04-08-2004, 04:47 PM   #11
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
I skipped from 7.3 to fedora core 1, but I am sure that synaptic is available for 9 as well. You did install the two apt rpms for RH9 (if I understand your distro correctly) didn't you? I uninstalled and erased my downloaded synaptic rpm (located in /var/cache/apt/archives) to make sure it is still on the internet:
Code:
Thu Apr 08 05:38 PM root@uilleann ~ # apt-get update
Get:1 http://ayo.freshrpms.net fedora/linux/1/i386 release [1991B]
Fetched 1991B in 1s (1371B/s)
Hit http://ayo.freshrpms.net fedora/linux/1/i386/core pkglist
Hit http://ayo.freshrpms.net fedora/linux/1/i386/core release
Hit http://ayo.freshrpms.net fedora/linux/1/i386/updates pkglist
Hit http://ayo.freshrpms.net fedora/linux/1/i386/updates release
Hit http://ayo.freshrpms.net fedora/linux/1/i386/freshrpms pkglist
Hit http://ayo.freshrpms.net fedora/linux/1/i386/freshrpms release
Reading Package Lists... Done
Building Dependency Tree... Done
Thu Apr 08 05:38 PM root@uilleann ~ # apt-get install synaptic
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  synaptic
0 upgraded, 1 newly installed, 0 removed and 0 not upgraded.
Need to get 779kB of archives.
After unpacking 2235kB of additional disk space will be used.
Get:1 http://ayo.freshrpms.net fedora/linux/1/i386/freshrpms synaptic 0.47-1.fr [779kB]
Fetched 779kB in 3m11s (4071B/s)
Committing changes...
Preparing...                ########################################### [100%]
   1:synaptic               ########################################### [100%]
Done.
Thu Apr 08 05:42 PM root@uilleann ~ #
 
Old 04-08-2004, 05:46 PM   #12
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Original Poster
Rep: Reputation: 15
Ok I had a look at sources.list and put..

http://ayo.freshrpms.net

on line 15 and then ran

[root@jekyll root]# apt-get update
E: Type 'http://ayo.freshrpms.net' is not known in on line 15 in source list /etc/apt/sources.list
or
There is a link to a page which has 2apt binaries (one devloper) plus a source.rpm but pasting the page url doesnt work.
[root@jekyll root]# apt-get update
E: Malformed line 15 in source list /etc/apt/sources.list (dist)


Which 2 rpms are the ones you mean, apt is only 1 rpm.

Bob

Last edited by BobNz; 04-08-2004 at 05:47 PM.
 
Old 04-08-2004, 06:57 PM   #13
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Try removing that line and putting these in (from my /etc/apt/sources.list)
Code:
# Red Hat Linux 9
rpm http://ayo.freshrpms.net redhat/9/i386 os updates freshrpms
rpm-src http://ayo.freshrpms.net redhat/9/i386 os updates freshrpms
 
Old 04-08-2004, 07:10 PM   #14
BobNz
Member
 
Registered: May 2003
Location: NewZealand
Distribution: RH9.0
Posts: 74

Original Poster
Rep: Reputation: 15
Thanks for that, heres result...

[root@jekyll root]# apt-get update
Get:1 http://ayo.freshrpms.net redhat/9/i386 release [1171B]
Fetched 1171B in 2s (561B/s)
Get:1 http://ayo.freshrpms.net redhat/9/i386/os pkglist [1357kB]
Get:2 http://ayo.freshrpms.net redhat/9/i386/os release [140B]
Get:3 http://ayo.freshrpms.net redhat/9/i386/updates pkglist [428kB]
Get:4 http://ayo.freshrpms.net redhat/9/i386/updates release [153B]
Get:5 http://ayo.freshrpms.net redhat/9/i386/freshrpms pkglist [151kB]
Get:6 http://ayo.freshrpms.net redhat/9/i386/freshrpms release [157B]
Get:7 http://ayo.freshrpms.net redhat/9/i386/os srclist [152kB]
Get:8 http://ayo.freshrpms.net redhat/9/i386/updates srclist [24.4kB]
Get:9 http://ayo.freshrpms.net redhat/9/i386/freshrpms srclist [35.0kB]
Fetched 2147kB in 1m6s (32.4kB/s)
Reading Package Lists... Done
Building Dependency Tree... Done
[root@jekyll root]#
is it safe to assume that apt is up to date now?

just ran apt-get install synaptic

[root@jekyll root]# apt-get install synaptic
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
apt
The following NEW packages will be installed:
apt synaptic
0 packages upgraded, 2 newly installed, 0 removed and 3 not upgraded.
Need to get 1314kB of archives.
After unpacking 3520kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ayo.freshrpms.net redhat/9/i386/freshrpms apt 0.5.5cnc6-fr1 [878kB]
Get:2 http://ayo.freshrpms.net redhat/9/i386/freshrpms synaptic 0.42-1.fr [437kB]
Fetched 1314kB in 41s (31.9kB/s)
Executing RPM (-Uvh)...
warning: /var/cache/apt/archives/apt_0.5.5cnc6-fr1_i386.rpm: V3 DSA signature: NOKEY, key ID e42d547b
Preparing... ########################################### [100%]
1:apt warning: /etc/apt/apt.conf created as /etc/apt/apt.conf.rpmnew
warning: /etc/apt/rpmpriorities saved as /etc/apt/rpmpriorities.rpmorig
warning: /etc/apt/sources.list created as /etc/apt/sources.list.rpmnew
warning: /etc/apt/vendors.list created as /etc/apt/vendors.list.rpmnew
########################################### [ 50%]
2:synaptic ########################################### [100%]
[root@jekyll root]#

ran synaptic and synaptic loaded

is the "strange things going on in the world" part of synaptic humour or digital prophecy

Thanks a lot for your help. Now I'll see if I can get gcc to run.

Bob
 
Old 04-08-2004, 07:15 PM   #15
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Now I will bet you can install gcc with ease.

If you want an up-to date system, either do it with synaptic or

apt-get update
apt-get dist-upgrade

Last edited by fancypiper; 04-08-2004 at 07:17 PM.
 
  


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
command not found murshed Linux - Newbie 8 11-22-2007 04:51 AM
bash: <command name> command not found smash Programming 5 03-13-2006 08:48 AM
command not found ginda Linux - General 3 07-16-2005 04:15 PM
Command not found nfis Linux - Software 9 11-25-2003 11:00 PM
command not found jkp Linux - Newbie 3 01-21-2003 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:38 AM.

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