错误“意外令牌附近的语法错误'&' - 尝试从应用程序中的命令行运行文件

时间:2022-06-16 22:44:35

I am a newbie to Linux and I am only really using it to use a program for my final year thesis. I have got to grips with the language for the program but am having issues with actually running it in Linux. The program is called "CACTUS" and all documentation can be found here.

我是Linux的新手,我只是用它来为我的最后一年论文使用一个程序。我必须掌握该程序的语言,但我遇到了在Linux中实际运行它的问题。该程序名为“CACTUS”,所有文档都可以在这里找到。

I have extracted the application file and I have made the executable as instructed in the install.txt file:

我已经解压缩了应用程序文件,并按照install.txt文件中的指示制作了可执行文件:

"Installation of CACTUS for Linux or Mac machines.

“为Linux或Mac机器安装CACTUS。

  1. Unzip the directory and put in desired location. On terminal cd into the correct directory (you should be able to see the makefiles).

    解压缩目录并放入所需位置。在终端cd进入正确的目录(你应该能够看到makefile)。

  2. Create the executable by typing:

    通过键入以下内容创建可执

    $make

    or

    $make -f Makefile.gfortran

    $ make -f Makefile.gfortran

    on the terminal. The executable will be called cactus and be located in the directory one level above.You can add the executable's location to your path so that you can call it by simple typing cactus on the terminal instead of the complete path.

    在终端上。可执行文件将被称为cactus并位于上一级目录中。您可以将可执行文件的位置添加到路径中,以便您可以通过在终端上简单地键入cactus而不是完整路径来调用它。

  3. cd into the Test/RegTest directory

    cd进入Test / RegTest目录

    $cd ./Test/RegTest

    and run the RegTest by executing runreg.py with the path to the CACTUS executable as an argument (or just the name of the executable if you added it to your path).

    并通过执行runreg.py并使用CACTUS可执行文件的路径作为参数来运行RegTest(如果将其添加到路径中,则只执行可执行文件的名称)。

    $./runreg.py ../../../cactus

    or

    $./runreg.py cactus

    The output should say 'No differences' for all three tests. Note: if you have Python 3 installed used runreg_p3.py instead.

    输出应该对所有三个测试说“无差异”。注意:如果安装了Python 3,则使用runreg_p3.py。

    CONGRATULATIONS! You have successfully installed CACTUS.

    恭喜!您已成功安装CACTUS。

I have run this and I didn't get the "No Differences" returned on the runreg.py. I continued anyway as I did not know why or how I could fix this. (This may be a root cause of my overally problem here)

我运行了这个,并没有得到runreg.py上返回的“No Difference”。我还是继续说道,因为我不知道为什么或如何解决这个问题。 (这可能是我总体问题的根本原因)

As I progressed I have been trying to open an input file "TestVAWT.in" from TestCase2 with the following command:

随着我的进步,我一直在尝试使用以下命令从TestCase2打开输入文件“TestVAWT.in”:

./TestVAWT.in ../../../cactus

From this I get the error in the title returned. Am I correct in assuming that it has tried to run the TestVAWT.in file on the command line without referring to the Cactus application which I presume would be able to read the '&' prefix of the code along with the rest of the input file. Or is it something else I am missing here.

从这里我得到了返回标题中的错误。我是否正确地假设它已经尝试在命令行上运行TestVAWT.in文件而没有引用Cactus应用程序,我认为它可以读取代码的'&'前缀以及输入文件的其余部分。或者这是我在这里缺少的东西。

I would appreciate any help as I have been banging my head against a wall for some time now.

我很感激任何帮助,因为我已经把头撞到了墙上一段时间了。

Note: I am using Ubuntu 14.04 LTS.

注意:我使用的是Ubuntu 14.04 LTS。

Best Regards

Richard

1 个解决方案

#1


1  

Don't know the application, but looks kind of strange to me. Please try adding the Input-File as a parameter:

不知道应用程序,但看起来有点奇怪。请尝试添加Input-File作为参数:

cactus TestVAWT.in

#1


1  

Don't know the application, but looks kind of strange to me. Please try adding the Input-File as a parameter:

不知道应用程序,但看起来有点奇怪。请尝试添加Input-File作为参数:

cactus TestVAWT.in