2018年10月23日火曜日

rasberry pi 2 のg++のversion up


vsome-ipをrasberrypi でビルドするため、g++4.8に設定する必要がある。

apt-cache search 'g++' | grep ^g++
sudo apt-get install g++-4.8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10 
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20

デフォルトだとg++4.6が/usr/bin/g++からリンクされているので、変更する必要がある。

ls -l /usr/bin/g++*

lrwxrwxrwx 1 root root     21 10月 23 02:29 /usr/bin/g++ -> /etc/alternatives/g++
-rwxr-xr-x 1 root root 281892  1月 15  2013 /usr/bin/g++-4.6
-rwxr-xr-x 1 root root 620804  9月  6  2014 /usr/bin/g++-4.8


ls -l /etc/alternatives/g++
lrwxrwxrwx 1 root root 16 10月 23 02:29 /etc/alternatives/g++ -> /usr/bin/g++-4.8