sudo -i returns an error

From the comments and your further investigations it looks like your devtoolset is modifying the PATH. Unfortunately that includes what appears to be an old or broken sudo command.

It would be worth trying to modify the devtoolset include in your .bashrc like this, and then logging back in again:

if [ "$(gcc -dumpversion)" != "4.7.2" ]; then 
  scl enable devtoolset-1.1 bash
  PATH=/usr/bin:$PATH    # We need a working sudo
fi

Rather than work around the SCL's broken sudo wrapper, I just disabled it.

echo >> /opt/rh/devtoolset-2/root/usr/bin/sudo
chmod -x /opt/rh/devtoolset-2/root/usr/bin/sudo

Adding a newline to the end of the file ensures it won't get overwritten by subsequent Yum updates, and then I just make it non-executable.

I installed the dev toolset to get modern versions of gcc and c++ on RHEL 6, and have had no issues compiling code without the fake sudo in the mix.