LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   rpm: command not found in CentOS (http://www.linuxquestions.org/questions/linux-distributions-5/rpm-command-not-found-in-centos-539964/)

GavB 03-23-2007 01:36 PM

rpm: command not found in CentOS
 
Hi,

Someone I know just got a server and I said I would install some stuff for them starting with the control panel from zervex.com (DSM)

I ran in to a problem straight away with an error saying:


===== Checking for basic tools =====
Checking for /bin/rpm: MISSING
FATAL: /bin/rpm not present, cannot install


I have used Centos before, I always do because the first server I ever worked with had that on so I just stuck with it. I've never known this problem before.

They have Centos 4.4 if that helps.

Any help would be much appreciated, thanks :D

Lenard 03-23-2007 03:20 PM

So check yourself;

which rpm
rpm --version

Sounds like you may need to speak with zervex.com tech support.

GavB 03-23-2007 06:02 PM

Hi, thanks for your reply, but this what I get when I type in that command:


login as: root
Using keyboard-interactive authentication.
Password:
Last login: Fri Mar 23 18:26:05 2007 from xxx.yyy.zzz.com
sc2:~# rpm --version
-bash: rpm: command not found
sc2:~#


Zervex.com is just where I got the control panel from so I don't think that is the problem - I've used it loads of times before, the server is hosted with 49pence. Why would the rpm command not be found?

Lenard 03-24-2007 07:12 AM

OK, somebody somehow either removed the rpm packages or did not install them (don't know why). You have some choices;

Boot with the Installation media and do an upgrade/add packages installation to install the rpm packages.

Copy the /usr/lib/rpm directory structure from another system or the Installation media (in rescue mode) then install the rpm packages from Installation media after rebooting.

/usr/lib/rpm/rpmi -ivh /path/to/the/packages/rpm*.<arch>.rpm

Hint: it is a good idea to have a spare copy of the rpmi file someplace safe.

GavB 03-24-2007 09:41 AM

Many thanks for your help.

So am I getting this right? It looks like the server host didn't install the RPM packages? I know they haven't been removed because the first thing I did was try to install that control panel which have done on many occasions before (the only commands that uses is wget and chmod then run the file)

It's just that the host has said that it will be 40+vat to reinstall the operating system, if it is something they have done wrong on installation then they shouldn't really be charging.

Lenard 03-24-2007 10:45 AM

The default installation for any version of Linux is to install the default package installer tool or utility, with the Red Hat family it is rpm. At the very least the default rpm packages are: rpm, rpm-libs, rpm-python and popt packages.

Check your /root/install.log file and see if they were installed at one time.

Let's get the version number to start with;
$ cat /root/install.log | grep rpm-libs
Installing rpm-libs - 4.4.2-33.el5.x86_64

Now let's check if the default rpm packages are installed;
$ cat /root/install.log | grep 4.4.2-33
Installing rpm - 4.4.2-33.el5.x86_64
Installing rpm-libs - 4.4.2-33.el5.x86_64
Installing rpm-python - 4.4.2-33.el5.x86_64

I do not understand why they would want to charge for this, it sounds like they goofed to start with. What good is an operating system installation if you cannot install with the standard packaging installation tool or utility????

GavB 03-24-2007 11:59 AM

Hi, theres no /root/install.log file on the server for some reason - I checked on a load of my other servers and they all have it - looks like something has gone very wrong here.

With the install.log not existing the commands that you mentioned (cat /root/install.log | grep rpm-libs) are not working.

Does this mean a fresh installation is needed? or is there something we can do remotely to fix it?

ctech01 03-24-2007 05:47 PM

CentOS was not the OS selected for installation.
This client chose Debian3.1

:tisk:

GavB 03-25-2007 07:40 AM

Yeah, looks like either the person that ordered the server chose the wrong Os or the order form on the website doesn't work. The latter is unlikely.

Thanks anyway


All times are GMT -5. The time now is 06:28 AM.