LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apt-get does not exist on my CentOS release 5.4 (https://www.linuxquestions.org/questions/linux-newbie-8/apt-get-does-not-exist-on-my-centos-release-5-4-a-794951/)

amanacare 03-12-2010 08:03 AM

apt-get does not exist on my CentOS release 5.4
 
hello

apt-get does not exist on my server:

when i run this command:
apt-get install php5-dev
i get:
Code:

apt-get: command not found
information: Plesk 9.3.0 | PHP Version 5.1.6 | CentOS release 5.4 | Linux 2.6.28.7 | GenuineIntel, Intel(R) Atom(TM) CPU 330
in usr/bin there's nothing called apt-get
i have root access (SSH)

bmxcess 03-12-2010 08:06 AM

try

Code:

sudo apt-get install php5-dev
and enter the root password when requested.

HTH

MTK358 03-12-2010 08:07 AM

I thought you evter your password with sudo, not root.

pixellany 03-12-2010 08:11 AM

At least in Ubuntu, sudo uses the primary user password, not the root password.

But in Debian, you would "su" to root and then issue the command (without sudo)

N'est-ce pas?

amanacare 03-12-2010 08:13 AM

Quote:

[root@XXX-XX-XXX-XX ~]# sudo apt-get install php5-dev
sudo: apt-get: command not found
did not work

amanacare 03-12-2010 08:15 AM

je ne crois pas :)

Quote:

[root@XXX-XX-XXX-XX ~]# su apt-get install php5-dev
su: user apt-get does not exist

jamescondron 03-12-2010 08:15 AM

Its moot anyway, OP has root.

And, as OP says, apt-get isn't where it ought to be, in /usr/bin.

Yeesh, does nobody read any more?

pixellany 03-12-2010 08:16 AM

Try:
running apt-get as root. (no sudo)

using "locate" to find the command

checking your PATH using "echo $PATH"

searching for apt-get using "find"

jamescondron 03-12-2010 08:17 AM

**SORRY FOR DOUBLE POST, FORGOT TO ANSWER THE QUESTION**

OP: you wouldn't be the first to do this, but are you totally sure you're using debian? I've done that before.

Code:

cat /etc/issue
uname -a


MTK358 03-12-2010 08:18 AM

Quote:

Originally Posted by amanacare (Post 3895741)
je ne crois pas :)

That's not how you use su.

Code:

[username@host]$ su
Password: <Enter root password here>
[root@host]# apt-get install php5-dev
[root@host]# exit
exit
[username@host]$


pixellany 03-12-2010 08:18 AM

Quote:

Originally Posted by jamescondron (Post 3895742)
Its moot anyway, OP has root.

Then why using sudo?

jamescondron 03-12-2010 08:19 AM

Well OP isn't, the suggestions are to use sudo, but the first post says the command used is apt-get install php5-dev.

Which is why its moot

MTK358 03-12-2010 08:20 AM

An alternative way to use su:

Code:

$ su -c 'apt-get install php5-dev'
Password: <enter root password>


amanacare 03-12-2010 08:35 AM

Quote:

Originally Posted by jamescondron (Post 3895746)
**SORRY FOR DOUBLE POST, FORGOT TO ANSWER THE QUESTION**

OP: you wouldn't be the first to do this, but are you totally sure you're using debian? I've done that before.

Code:

cat /etc/issue
uname -a


thanks! i just found out a shocking fact! they provided me with CentOS release 5.4 and not Debian Lenny!

my apologies it's really not my mistake...
anyway how can i fix my problem on CentOS? :(

jwl17330536 03-12-2010 08:37 AM

yum install <package>


All times are GMT -5. The time now is 08:35 PM.