LinuxQuestions.org
Help answer threads with 0 replies.
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 09-04-2012, 08:34 PM   #1
Russell91
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Rep: Reputation: Disabled
Error message on bash startup


In the process of installing opencv on my computer, I wound up creating an error that pops up each time I open a new terminal:

bash: /PKG_CONFIG_PATH=$/bin:/usr/local/lib/pkgconfig: No such file or directory

Any ideas on what might be causing this?
 
Old 09-04-2012, 08:39 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Msg means what it says...
Code:
$/bin
meaningless.
You could also check the other path /usr/local/lib/pkgconfig does exist as well.
 
Old 09-04-2012, 08:45 PM   #3
Russell91
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Msg means what it says...
Code:
$/bin
meaningless.
You could also check the other path /usr/local/lib/pkgconfig does exist as well.
I am not sure what you mean by "Msg means what it says...". I am able to cd into both the bin directory and the /usr/local/lib/pkgconfig without any problems.
 
Old 09-04-2012, 08:51 PM   #4
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,825

Rep: Reputation: 221Reputation: 221Reputation: 221
Since you don't say what flavor of Linux you use, how you installed opencv,

Look at
~/.bashrc
$PATH which could be stored in several places depending on distro.
Maybe /etc/profile or ~/.profile
Quote:
PATH=$/bin
That's not right.
Quote:
/usr/local/lib/pkgconfig
Is that right?

Find out where that $PATH statement is and change it.
 
Old 09-04-2012, 08:57 PM   #5
kaotikzen
LQ Newbie
 
Registered: Mar 2008
Location: Gilbert, AZ
Distribution: Arch
Posts: 6

Rep: Reputation: 0
What's happening is that your bash profile thinks you want to execute a command located at a path that doesn't exist (literally: /PKG_CONFIG_PATH=$/bin:/usr/local/lib/pkgconfig).

Check out both ~/.bashrc and ~/.bash_profile and look for this line:

/PKG_CONFIG_PATH=$/bin:/usr/local/lib/pkgconfig

Remove the the leading forward slash so that it looks like this:

PKG_CONFIG_PATH=$/bin:/usr/local/lib/pkgconfig

Then save the file. The next time you load up bash, that error should go away.

(note: if you've edited /etc/profile in your journeys, you may need to look there as well)
 
Old 09-04-2012, 10:29 PM   #6
Russell91
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kaotikzen View Post
What's happening is that your bash profile thinks you want to execute a command located at a path that doesn't exist (literally: /PKG_CONFIG_PATH=$/bin:/usr/local/lib/pkgconfig).

Check out both ~/.bashrc and ~/.bash_profile and look for this line:

/PKG_CONFIG_PATH=$/bin:/usr/local/lib/pkgconfig

Remove the the leading forward slash so that it looks like this:

PKG_CONFIG_PATH=$/bin:/usr/local/lib/pkgconfig

Then save the file. The next time you load up bash, that error should go away.

(note: if you've edited /etc/profile in your journeys, you may need to look there as well)
This seems like a reasonable explanation, but I did not find any reference to the line in ~.bashrc, ~.profile /etc/profile (pasted below). However, it does seem that I am missing a ~.bash_profile file: ~$ ls -a | grep profile returned only .profile. Perhaps this could be a source of the problem? Also, I am using Ubuntu 11.1 and I could have changed any one of a number of things in the installation process, as it is pretty easy to mess with things when you don't know what you are doing.

>Find out where that $PATH statement is and change it.
This is what I have been trying to do, but none of the files being called at bash launch seem to contain the line.

Thanks for the help so far.

Code:
~.bashrc: --------------------------------

# ~/.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(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# 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 "$(SHELL=/bin/sh 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) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

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

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# 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 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 ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
source /opt/ros/electric/setup.bash

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home

Last edited by Russell91; 09-04-2012 at 10:51 PM.
 
Old 09-04-2012, 10:49 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Could you post the contents of "/opt/ros/electric/setup.bash"? And please use code tags.
 
Old 09-04-2012, 10:53 PM   #8
Russell91
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Could you post the contents of "/opt/ros/electric/setup.bash"? And please use code tags.
Code:
#!/bin/bash
# IT IS UNLIKELY YOU WANT TO EDIT THIS FILE BY HAND
# IF YOU WANT TO CHANGE THE ROS ENVIRONMENT VARIABLES
# EDIT "setup.sh" IN THIS DIRECTORY.

# Load the path of this particular setup.bash                                                                                                                  

SCRIPT_PATH="${BASH_SOURCE[0]}";
if([ -h "${SCRIPT_PATH}" ]) then
  while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
fi
pushd . > /dev/null
cd `dirname ${SCRIPT_PATH}` > /dev/null
SCRIPT_PATH=`pwd`;
popd  > /dev/null


. $SCRIPT_PATH/setup.sh

if [ -e ${ROS_ROOT}/tools/rosbash/rosbash ]; then
  . ${ROS_ROOT}/tools/rosbash/rosbash
fi
 
Old 09-04-2012, 11:03 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Hm, not there either. Maybe just grep for "PKG_CONFIG_PATH" in all hidden files in your home directory:

Code:
 grep PKG_CONFIG_PATH ~/.*
 
Old 09-04-2012, 11:10 PM   #10
Russell91
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Hm, not there either. Maybe just grep for "PKG_CONFIG_PATH" in all hidden files in your home directory:

Code:
 grep PKG_CONFIG_PATH ~/.*
So this returns a list of files from my ./bash_history. It seems like the following line might have caused the problem:

Code:
 /home/russellstewart/.bash_history:PKG_CONFIG_PATH=:/usr/local/lib/pkgconfig
/home/russellstewart/.bash_history:export PKG_CONFIG_PATH=:/usr/local/lib/pkgconfig
However, I am not sure how this would cause the "/" in "/PKG_CONFIG_PATH" to appear.

Also, upon restarting again, the error on the bash has lost the $/bin: path, so it seems that the problem is in the /usr/local/lib/pkgconfig directory. When I first ran into this problem, that folder contained an opencv.pc file. I have since removed that file along with most of the cv installation to no avail.

Last edited by Russell91; 09-04-2012 at 11:12 PM.
 
Old 09-05-2012, 07:11 PM   #11
kaotikzen
LQ Newbie
 
Registered: Mar 2008
Location: Gilbert, AZ
Distribution: Arch
Posts: 6

Rep: Reputation: 0
Did you, by chance, check the contents of that .profile file you found?

UPDATE:
Reread your reply. You did check that file. I'm high on cold meds apparently.

Which distribution are you using? Maybe I can setup a VM and break it on purpose and share in your pain some. Oh, is there a a .bash_login file in your home directory, if yes check that too!

Last edited by kaotikzen; 09-05-2012 at 07:20 PM. Reason: Hopped up on cold medicine/failed reading comprehension as a child
 
  


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
Virt-Manager - Error Message on Startup mickeyboa Fedora 0 06-27-2010 12:30 PM
Startup Error Message expatCM Ubuntu 3 11-18-2007 06:48 PM
Error message at startup Stuffy89 Linux - Software 1 08-16-2005 12:13 AM
error message on gnome startup r.stiltskin Mandriva 0 10-01-2004 11:03 AM
Gnome2 startup error message duaux Linux - General 7 11-15-2002 12:32 PM


All times are GMT -5. The time now is 10:28 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