version `GLIBCXX_3.4.30' not found and sovled

when excute the example of the doc, the error happed.

Traceback (most recent call last): File “”, line 7, in from import download_testdata File “/home/jiazhanbo/ai_dev/build_fold/0.12.0/apache-tvm-src-v0.12.0/python/tvm/”, line 26, in from ._ffi.base import TVMError, version, _RUNTIME_ONLY File “/home/jiazhanbo/ai_dev/build_fold/0.12.0/apache-tvm-src-v0.12.0/python/tvm/_ffi/”, line 28, in from .base import register_error File “/home/jiazhanbo/ai_dev/build_fold/0.12.0/apache-tvm-src-v0.12.0/python/tvm/_ffi/”, line 71, in _LIB, _LIB_NAME = _load_lib() File “/home/jiazhanbo/ai_dev/build_fold/0.12.0/apache-tvm-src-v0.12.0/python/tvm/_ffi/”, line 57, in _load_lib lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL) File “/home/jiazhanbo/.conda/envs/pytorch-38/lib/python3.8/ctypes/”, line 373, in init self._handle = _dlopen(self._name, mode) OSError: /home/jiazhanbo/.conda/envs/pytorch-38/bin/…/lib/ version `GLIBCXX_3.4.30’ not found (required by /home/jiazhanbo/ai_dev/build_fold/0.12.0/apache-tvm-src-v0.12.0/python/tvm/

the lib of conda is ok:

the lib of os is ok:

ref this link package management - GLIBCXX 3.4.30 not found in conda environment - Ask Ubuntu I add the link in conda evn to the os lib: in path ~/.conda/envs/pytorch-38/lib use this cmd: ln -sf /usr/lib/x86_64-linux-gnu/

it’s OK

Hi @lanyuflying, did you install TVM by pip install? If so, it is probably because the pip wheel is built on manylinux where the libstdc++ is newer than the one Ubuntu offers. One another workaround you can do is to use Conda to install gcc so that the latest libstdc++ can be installed, as mentioned in the “Note for Pip Installation under Conda” section here MLC | MLC Packages

1 Like