升级链接:
CentOS 7 gcc版本需升级到7.5.0 ,详细可参考文档:https://learn.microsoft.com/zh-cn/azure/cognitive-services/speech-service/how-to-configure-rhel-centos-7
按照上面的操作完成后,还是不行,语音转换接口访问还是报错。按照如下步骤,将库文件改掉,将旧的包卸载,然后加上环境变量。注意:最后将用到高版本gcc的transform服务重启,才能生效,此时再次调用这个接口,文本正常转为mp3语音
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm sudo yum update -y sudo yum groupinstall -y "Development tools" sudo yum install -y alsa-lib dotnet-sdk-2.1 java-1.8.0-openjdk-devel openssl sudo yum install -y gstreamer1 gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-bad-free gstreamer1-plugins-ugly-free cd /usr/local yum install -y gmp-devel mpfr-devel libmpc-devel curl https://ftp.gnu.org/gnu/gcc/gcc-7.5.0/gcc-7.5.0.tar.gz -O tar -xf gcc-7.5.0.tar.gz mkdir gcc-7.5.0-build && cd gcc-7.5.0-build ../gcc-7.5.0/configure --enable-languages=c,c++ --disable-bootstrap --disable-multilib --prefix=/usr/local make -j$(nproc) sudo make install-strip
========》〉》
cd /usr/lib64/ rm -rf libstdc++.so.6 rm -rf libstdc++.so.6.0.24 cp /usr/local/gcc-7.5.0-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.24 . ln -sv libstdc++.so.6.0.24 libstdc++.so.6 cd /usr/local/lib64/ rm -rf libstdc++.so.6 rm -rf libstdc++.so.6.0.24 cp /usr/local/gcc-7.5.0-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.24 . ln -sv libstdc++.so.6.0.24 libstdc++.so.6 yum remove gcc gcc-c++ -y cd vim .bash_profile 添加PATH=$PATH:$HOME/bin:/usr/local/bin/ export CC=/usr/local/bin/gcc export CXX=/usr/local/bin/g++ w 保存 export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH export PATH=/usr/local/bin:$PATH source ~/.bash_profile gcc --version
标签:libstd,gcc,c++,版本升级,usr,so.6,local From: https://www.cnblogs.com/machangwei-8/p/18156573