LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2010, 09:03 AM   #1
amanacare
LQ Newbie
 
Registered: Mar 2010
Posts: 24

Rep: Reputation: 0
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)

Last edited by amanacare; 03-12-2010 at 10:13 AM. Reason: SOLVED
 
Old 03-12-2010, 09:06 AM   #2
bmxcess
Member
 
Registered: Jan 2009
Location: Brisbane, Australia
Distribution: @work:RHEL 5.4/Fedora 13, @home:slack64-current,ubuntu lynx studio
Posts: 65

Rep: Reputation: 19
try

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

HTH
 
Old 03-12-2010, 09:07 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
I thought you evter your password with sudo, not root.
 
Old 03-12-2010, 09:11 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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?
 
Old 03-12-2010, 09:13 AM   #5
amanacare
LQ Newbie
 
Registered: Mar 2010
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
[root@XXX-XX-XXX-XX ~]# sudo apt-get install php5-dev
sudo: apt-get: command not found
did not work
 
Old 03-12-2010, 09:15 AM   #6
amanacare
LQ Newbie
 
Registered: Mar 2010
Posts: 24

Original Poster
Rep: Reputation: 0
je ne crois pas

Quote:
[root@XXX-XX-XXX-XX ~]# su apt-get install php5-dev
su: user apt-get does not exist
 
Old 03-12-2010, 09:15 AM   #7
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
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?
 
Old 03-12-2010, 09:16 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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"
 
Old 03-12-2010, 09:17 AM   #9
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
**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
 
Old 03-12-2010, 09:18 AM   #10
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by amanacare View Post
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]$
 
Old 03-12-2010, 09:18 AM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by jamescondron View Post
Its moot anyway, OP has root.
Then why using sudo?
 
Old 03-12-2010, 09:19 AM   #12
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
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
 
Old 03-12-2010, 09:20 AM   #13
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
An alternative way to use su:

Code:
$ su -c 'apt-get install php5-dev'
Password: <enter root password>
 
Old 03-12-2010, 09:35 AM   #14
amanacare
LQ Newbie
 
Registered: Mar 2010
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
**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?
 
Old 03-12-2010, 09:37 AM   #15
jwl17330536
Member
 
Registered: Feb 2010
Location: Raleigh, NC
Posts: 83

Rep: Reputation: 22
yum install <package>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Will apt-get installs 32bit debain package on 64bit debian/ubuntu machine ?? narendra1310 Linux - Software 1 03-09-2010 08:43 AM
[SOLVED] Thanks a lot , Debian lenny - apt sources and Grub loader problem maj.anwar Linux - Newbie 5 08-25-2009 10:31 PM
clamav kills apt update procedure on Debian Lenny (stable, vanilla) x84 meowing Linux - Server 1 07-22-2009 06:28 PM
Whats your stable /etc/apt/sources.list for testing/lenny debian ? frenchn00b Debian 6 11-03-2008 12:17 PM
apt-get install build-essentials // doesn't work on debian Lenny bucovaina78 Linux - Software 3 10-27-2008 03:05 PM


All times are GMT -5. The time now is 10:14 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration