user040891
user040891

Reputation: 33

How to install gdb in unix without root access

I am trying to install gdb in unix but i don't have root access to create files and directories in root folder. However i can only create folders in my own directories. I have followed this link http://www.tutorialspoint.com/gnu_debugger/installing_gdb.htm but every time execution fails at step 4 because it needs to create files at root level. How do I fix it?

Step1:
$ build> gzip -d gdb-6.6.tar.gz 
$ build> tar xfv gdb-6.6.tar 
$ build> cd gdb-6.6 
Step2:
$ gdb-6.6> .⁄configure 
Step3:
$ gdb-6.6> make
Step4:
$ gdb-6.6> make install 
**execution fails at this point.

Or is there any other solution to install gdb in unix without root level access. Please help.

Upvotes: 3

Views: 3507

Answers (1)

falsetru
falsetru

Reputation: 369274

When you ./configure, you can specify --prefix which control whether software is installed.

./configure --prefix=$HOME/gdb
make
make install

Above will install gbd under $HOME/gdb.

You need to specify $HOME/gdb/bin/gdb to run the program after installation. Or adjust $PATH to include $HOME/gdb/bin:

export PATH=$PATH:$HOME/gdb/bin

Upvotes: 4

Related Questions