Yes, what you have to do if you are running different versions of cgminer, or different versions of bfgminer is go to /usr/local/bin and rename "cgminer" to something else, then in your config or .sh instead of calling cgminer, you call whatever you renamed the file to. Then you compile your second version and can leave it cgminer, or as I suggest do the same as the first and rename it and just make sure to call whatever you named it as above. I have two versions of cgminer, one for Gridseed 5 chip units that I renamed to gridseed, and one cgminer for Dualminer that is renamed dualminer.
You may not have permission to rename the files so just chmod 777 /usr/local/bin then rename it. Hope that helps, took me a little to figure it out when I first started with linux.