diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 797c0fbcc4a2d61f5cbbf691db19b4cba5d38630..bec161a571d0f98b99ac656f08cbc2d401c943fc 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -91,3 +91,9 @@ endif() install(DIRECTORY ${PADDLE_PYTHON_PACKAGE_DIR} DESTINATION opt/paddle/share/wheels ) + +find_program(PATCHELF_EXECUTABLE patchelf) +if(NOT PATCHELF_EXECUTABLE) + message(FATAL_ERROR "patchelf not found, please install it.\n" + "For Ubuntu, the command is: apt-get install -y patchelf.") +endif()