To use the Speech SDK on Red Hat Enterprise Linux (RHEL) 7 x64 and CentOS 7 x64, update the C++ compiler (for C++ development) and the shared C++ runtime library on your system.
# Build GCC 7.5.0 and runtimes and install them under /usr/local 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
Environment settings
Run the following commands to complete the configuration:
1 2 3 4 5 6 7 8 9 10 11 12
# Add updated C/C++ runtimes to the library path # (this is required for any development/testing with Speech SDK) export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH # 只运行上面这一行就行了,可以写到环境变量中 # For C++ development only: # - add the updated compiler to PATH # (note, /usr/local/bin should be already first in PATH on vanilla systems) # - add Speech SDK libraries from the Linux tar package to LD_LIBRARY_PATH # (note, use the actual path to extracted files!) export PATH=/usr/local/bin:$PATH hash -r # reset cached paths in the current shell session just in case export LD_LIBRARY_PATH=/path/to/extracted/SpeechSDK-Linux-<version>/lib/centos7-x64:$LD_LIBRARY_PATH