Bash 如何设置具有-(破折号)选项的环境变量

Bash 如何设置具有-(破折号)选项的环境变量,bash,environment-variables,Bash,Environment Variables,我正在尝试在linux上构建一个软件,我需要在bash shell中设置以下环境变量 BLAS_LIBRARIES=-L/home/someuser/GotoBLAS2/lib-lgoto2-lgfortran-lpthread 库布拉斯大学图书馆=-L/usr/local/cuda/4.0.17/cuda/lib64-lcublas-lcudart-lcuda 在bash shell中执行此操作时,会出现以下错误: bash:-lgoto2:未找到命令 bash:-lcublas:未找到命令

我正在尝试在linux上构建一个软件,我需要在bash shell中设置以下环境变量

BLAS_LIBRARIES=-L/home/someuser/GotoBLAS2/lib-lgoto2-lgfortran-lpthread 库布拉斯大学图书馆=-L/usr/local/cuda/4.0.17/cuda/lib64-lcublas-lcudart-lcuda

在bash shell中执行此操作时,会出现以下错误: bash:-lgoto2:未找到命令 bash:-lcublas:未找到命令


谁能告诉我如何设置这些设置而不出现这些错误吗?

您只需要引用它们:

BLAS_LIBRARIES="-L/home/someuser/GotoBLAS2/lib -lgoto2 -lgfortran -lpthread "

你只需要引用它们:

BLAS_LIBRARIES="-L/home/someuser/GotoBLAS2/lib -lgoto2 -lgfortran -lpthread "

还请注意,不引用它的问题是由于空格,而不是-字符。还请注意,不引用它的问题是由于空格,而不是-字符。