LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   cc: command not found (https://www.linuxquestions.org/questions/linux-software-2/cc-command-not-found-167483/)

BobNz 04-07-2004 06:40 PM

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:confused:

fancypiper 04-07-2004 08:19 PM

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. :D 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

BobNz 04-08-2004 12:05 AM

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

MS3FGX 04-08-2004 12:59 AM

Why are you trying to compile a shell script?

BobNz 04-08-2004 01:25 AM

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

fancypiper 04-08-2004 10:21 AM

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.

BobNz 04-08-2004 04:19 PM

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

BobNz 04-08-2004 04:28 PM

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.

fancypiper 04-08-2004 04:32 PM

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

BobNz 04-08-2004 04:33 PM

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

fancypiper 04-08-2004 04:47 PM

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 ~ #


BobNz 04-08-2004 05:46 PM

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

fancypiper 04-08-2004 06:57 PM

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


BobNz 04-08-2004 07:10 PM

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 :o

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

fancypiper 04-08-2004 07:15 PM

:cool: Now I will bet you can install gcc with ease. :D

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

apt-get update
apt-get dist-upgrade


All times are GMT -5. The time now is 11:41 AM.