LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   adding a dir to PATH (https://www.linuxquestions.org/questions/linux-newbie-8/adding-a-dir-to-path-486482/)

lcaley 09-24-2006 09:38 AM

adding a dir to PATH
 
Hey guys, I'm an absolute noobie to linux. I'm running Ubuntu. So far, I like it. I'm trying to install my video drivers though, and thats giving me some trouble. It goes through the start-up of the program, and then gives me an error:

ERROR: Unable to find the system utility `ld`; please make sure you have the
package 'binutils' installed. If you do have binutils installed,
then please check that `ld` is in your PATH.


so I went out and installed binuntils, and I've been looking around on various forums and resources on the internet for a few days now, and I can't find anything that seems to work adding this folder to my path.


Thanks for all help available.

Brian1 09-24-2006 09:51 AM

Use a line in your ~/.bashrc like this to make in on reboot.
export PATH=$PATH:/opt/kde3/bin

Brian

lcaley 09-24-2006 09:58 AM

where would i put it? my .bashrc file looks like this:



# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(2) for more options
export HISTCONTROL=ignoredups

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac

# Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
;;
*)
;;
esac

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
# . ~/.bash_aliases
#fi

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

Brian1 09-24-2006 10:09 AM

Anywhere in it will do.

Brian1

tuxrules 09-24-2006 10:09 AM

Quote:

Originally Posted by lcaley
where would i put it? my .bashrc file looks like this:

Just add it at the end. .bashrc is read when you login via terminal and sets up a convenient environment for you.

Tux,

lcaley 09-24-2006 10:18 AM

ok, i added this line to the end of my .bashrc and restarted the terminal, and it still isnt working. Any more suggestions?


export PATH=$PATH:/tmp/binutils-2.14/ld

jstephens84 09-24-2006 10:44 AM

try find / -name 'ld'. You may have the path wrong and that is why it is not working.

Zmyrgel 09-24-2006 10:48 AM

Did you install the binutils by "apt-get install binutils"?
You can find your ld program with "find / -name ld" mine is in "/usr/bin"

You should add folders to PATH instead of files.

lcaley 09-24-2006 11:11 AM

Quote:

Originally Posted by Zmyrgel
Did you install the binutils by "apt-get install binutils"?


Thats what i was doing wrong. Thanks!





I probably should make a new thread for this, but now its giving me an error saying:


ERROR: You appear to be running an X server; please exit X before
installing. For further details, please see the section INSTALLING
THE NVIDIA DRIVER in the README available on the Linux driver
download page at www.nvidia.com.


I have no idea what that means. Anyone know what I should do next?

Thanks to everyone who is trying to help me.. I'm totally lost here

jstephens84 09-24-2006 11:13 AM

Sure in order to install the nvidia driver you have to make sure your x server is not active. What runlevel is in your /etc/inittab file?

lcaley 09-24-2006 11:20 AM

# The default runlevel.
id:2:initdefault:


I think thats what you were asking me. I honstly know NOTHING about linux lol

jstephens84 09-24-2006 11:25 AM

Yeah that is what I was wandering. If you go to /etc/rc2.d or /etc/rc.d/rc2 you will see a file that says S99GDM if you change that to s99GDM and reboot it will keep the x server from starting. Then type sh <nivida_installer> This will start and install the nvidia driver into your kernel. then before you reboot again go back and change the s99GDM back to S99GDM. That should get the nvidia module installed.

lcaley 09-24-2006 11:32 AM

ok, this is what i have in my rc2.d, which one should i change? theres not a S99GDM


S05vbesave
S10acpid
S10powernowd.early
S10sysklogd
S11klogd
S13gdm
S14ppp
S18hplip
S19cupsys
S20apmd
S20dbus
S20festival
S20hotkey-setup
S20laptop-mode
S20makedev
S20nvidia-kernel
S20powernowd
S20rsync
S25bluez-utils
S25mdadm
S89anacron
S89atd
S89cron
S98usplash
S99acpi-support
S99rc.local
S99rmnologin
S99stop-readahead

lcaley 09-24-2006 11:33 AM

i just noticed that there is a S13gdm though, should i change that one?

jstephens84 09-24-2006 11:41 AM

You can Try but I am not sure. When I used ubuntu it was always S99GDM. but give it a try. I do recommend that you backup all your data just in case it has an undesirable result.


All times are GMT -5. The time now is 05:31 AM.