1. 程式人生 > >解決ubuntu下Matlab中找不到nvcc的問題

解決ubuntu下Matlab中找不到nvcc的問題

在matlab命令列中輸入

edit startup

It will open or create the file startup.m. Add the setenv line to the file, next time you restart Matlab the command will be automatically executed.

在開啟的startup.m檔案中,輸入 setenv('BASH_ENV','/etc/profile');

/etc/profile中,必須有export的nvcc的環境變數,例如 export PAHT=/usr/local/cuda-7.0/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH