Cross compile cuda error while loading shared libraries

I do cross compile for Jetson AGX Xavier, clone the .img and mount it,
and use cmake to build code

but there are two problems in error message

/mnt/jetson/usr/local/cuda-10.2/bin/nvcc: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

CMake Error at /usr/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find CUDA: Found unsuitable version ".", but required is exact
  version "10.2" (found /mnt/jetson/usr/local/cuda-10.2)

I already set LD_LIBRARY_PATH to /mnt/jetson/usr/local/cuda-10.2/lib
and set(CUDA_TOOLKIT_ROOT_DIR /mnt/jetson/usr/local/cuda-10.2) in cmake

update:
I add export PATH=/mnt/jetson/usr/local/cuda-10.2/bin:$PATH
and nvcc -V shows

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Feb_28_22:34:44_PST_2021
Cuda compilation tools, release 10.2, V10.2.300
Build cuda_10.2_r440.TC440_70.29663091_0

but I run cmake command in terminal, it cannot find CUDA_INCLUDE_DIRS

Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS) (found suitable exact
  version "10.2")

Hi,

Is this duplicated to the below topic?

If yes, let’s close this and track the following on that topic directly.

Thanks.