How To Set/add Environment Variables And Make File Search Priority On CentOS

Home » CentOS » How To Set/add Environment Variables And Make File Search Priority On CentOS
CentOS 1 Comment

Hi,

I’m using CentOS 6.8. In order to build gstreamer 1.8.2, I install some new packages, such as python 2.7 and yasm. And cerbero is the build system for gstreamer, and downloads some new packages from network and build them, such libtool, glib.

All new packages are downloaded, built and installed in my custom directory.

I want cerbero use the new packages in my custom directory. It mean that, linux will search my custom directory first, and will search others if target program or lib is not found.

How to make search priority for programs, static libs, shared libs, and pkgconfig files?

Thanks!

Regards

Andrew

One thought on - How To Set/add Environment Variables And Make File Search Priority On CentOS

  • Put the line

    export PATH=/path/to/packages;${PATH}

    into ~/.bashrc to change the path just for that user and/or into
    /etc/bashrc for everyone on the system. The user would then need to relogin to kick off ~/.bashrc or rebooting will get it for the
    /etc/bashrc file.

    Alternatively, run the same command in a shell for the new path to be effective in that shell immediately but just for that session.

    hth

LEAVE A COMMENT