Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
 sudo yum install automake libtool flex bison pkgconfig gcc-c++ 
     boost-devel libevent-devel zlib-devel python-devel ruby-devel

for installing required packages for Thrift on CentOS 5..

is it possible to run a version of it without sudo?

EDIT: I do NOT have root access and I am NOT in the sudoers file. I want to know whether I can do something like yum install automake ....... without waiting/asking to get added to the sudoers file

share|improve this question

migrated from May 21 '11 at 12:03

This question came from our site for professional and enthusiast programmers.

sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file. – Prince John Wesley May 21 '11 at 9:23
That's the whole point of sudoers and etc. You can't if you don't have the privileges. Otherwise each user might install whatever package he wanted without check. – George Kastrinis May 21 '11 at 9:37

Yes it is possible but not without root access. The sudo command would not be required if you had sufficient privileges to access what your full command needs.

For instance, if you logged in as root. Or, first become 'superuser' by issuing the command:


This will actually require the root password. Neither is recommended. It is best to use a system with the least privileges necessary and use sudo when needed, just as your full command already does.

Installing anything major (developer tools) are almost always going to require access of folders outside your home folder ~/

*This applies to all distributions of linux, not only the CentOS which you are using.

share|improve this answer

Never tried to do something like this myself but afaik rpm packages (atleast properly packages ones) do support relocation. But in order to install packages without root access, there are some steps required.

Following is lifted from

Setup a private RPM database

mkdir -p /home/username/local/lib/rpm
rpm --initdb --root /home/username/local --dbpath /home/username/local/lib/rpm

If you do not like ~/local/lib/rpm, you can pick a different subdirectory structure.

Check for package dependancies

rpm -ivh package.rpm

If dependancies are found, install the dependant RPMs before installing the package RPM.

Finally install the package

rpm --root /home/username/local --dbpath /home/username/local/lib/rpm \
--relocate /usr=/home/username/local --nodeps -ivh package.rpm

To use the package you will have to play around with LD_LIBRARY_PATH to let the loader know where the required shared labraries are and modify your PATH to include any required scripts and executables.

share|improve this answer

sudo grants a command root permissions if the current user is allowed to use sudo.

If you've already root access, there is no reason for putting it in front of a command besides logging. Just remove sudo if you don't have sudo installed and already running as root:

yum install automake libtool flex bison pkgconfig gcc-c++ 
     boost-devel libevent-devel zlib-devel python-devel ruby-devel

If you're not root yet and the root account has a password set, run su and use your root password to login.

share|improve this answer
I do not have su or root access is the there any way to install stuff without those privileges? – algorithmicCoder May 21 '11 at 9:34
Those packages installs to directories like /usr/bin which are writeable only by root. The programs in the packages make assumptions about the location of files, you cannot just install those packages in, say, your home directory. Can't you just compile the packages on a machine on which you've the compiler tools available, and move them to this machine on which you do not have root permissions? – Lekensteyn May 21 '11 at 9:38

Sudo command is used to grant single operation in superuser's authentication. If you want to skip the sudo command, you have to log in as superuser by using command "su".

share|improve this answer

It is. Assuming that you pulled this install line off of some website, it's customary to include the sudo line in the event the user did not do it themselves. However, it's usually a good idea anyway because giving a program you trust root access allows it to make necessary changes on a global level.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .