我正在尝试.csh
在Ubuntu 17.10 64bit上运行文件。每当我尝试使用执行文件
~/MSCS/Thesis\ MSCS/trainingScript.csh
它给了我这个错误:
bash: /home/zahra/MSCS/Thesis MSCS/trainingScript.csh: cannot execute binary file: Exec format error
我已经尝试过类似问题中给出的解决方案,但是没有运气。
file ~/MSCS/Thesis\ MSCS/trainingScript.csh
给我
/home/zahra/MSCS/Thesis MSCS/trainingScript.csh: C shell script, Little-endian UTF-16 Unicode text executable, with CRLF, CR line terminators
我该如何解决这个问题?
C Shell在BSD UNIX中更为常见,因为作为GNU / Linux的Ubuntu使用GNU项目中的BASH。
理想情况下,Shell脚本#!/bin/csh
在文件的开头包含一个shebang(),告诉系统如何运行它,但是您的系统中可能没有C Shell。
确保您的系统已加载CSH(它在Universe中,因此您需要启用该存储库)请参阅https://packages.ubuntu.com/artful/csh
要手动运行脚本(特别是如果shebang不在脚本中),请使用
csh -f trainingScript.csh
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句