I am trying to set PKG_CONFIG_PATH to CentOS here are the code I tried
export |grep PKG_CONFIG_PATH
no output, normal...
echo "$PKG_CONFIG_PATH" :/usr/local/lib/pkgconfig
why there is output here??
and if I
sudo sh -c "echo 'export PKG_CONFIG_PATH=$PKG_CONFIG_PATH :/usr/local/lib/pkgconfig' >> /etc/profile.d/path.sh source /etc/profile.d/path.sh
Now the same path will present twice........
export |grep PKG_CONFIG_PATH declare -x PKG_CONFIG_PATH=:/usr/local/lib/pkgconfig:/usr/local/lib/pkgconfig
So if the path hasnt been setup yet where is that $PKG_CONFIG_PATH coming from?
Update Edit: The first part of the problem is not actually matters because after restarting the variables are cleared
For the really problem I think it is because the files inside profile.d are been called twice once by /etc/bashrc once by /etc/profile. One may ask WTH??Why is that happened?BUG??TYPO??