简体   繁体   English

在El Capitan for Octave上安装控件v3.0.0软件包时出错

[英]Error installing control v3.0.0 package on El Capitan for Octave

I recently installed Octave using the binary installer found on this site: http://wiki.octave.org/Octave_for_MacOS_X 我最近使用以下站点上的二进制安装程序安装了Octave: http : //wiki.octave.org/Octave_for_MacOS_X

I then tried to install the control package using 'pkg install -forge control' but it gave me the error 'pkg: error running `make' for the control package.'. 然后,我尝试使用'pkg install -forge control'安装控制软件包,但它给我错误'pkg:为控制软件包运行`make'错误。 I have gone through most of the threads regarding this error but with no success. 我经历了有关此错误的大多数线索,但没有成功。

I then tried to use MacPorts to install the control package, I followed the instructions on the wiki page above with some help from this thread: Installing general package in octave has error . 然后,我尝试使用MacPorts安装控制程序包,在此线程的帮助下,我按照上面的Wiki页面上的说明进行操作: 在octave中安装常规程序包有error I believe I succeeded installing the packages because I can see them in the folder tree for Octave and MacPorts says it is installed when using the console. 我相信我已经成功安装了软件包,因为我可以在Octave的文件夹树中看到它们,而MacPorts表示使用控制台时已安装它们。

The problem is that when i run some code in Octave it cannot build as it doesn't know that I have installed any additional packages. 问题是,当我在Octave中运行某些代码时,它无法构建,因为它不知道我已经安装了任何其他软件包。 Using 'pkg list' in Octave it says that no additional packages installed. 在Octave中使用“ pkg list”表示没有安装其他软件包。 I feel like I need to link the two together but I don't know how? 我觉得我需要将两者链接在一起,但我不知道怎么办?

I'll happily explain more if I need to and I hope you can help me out. 如果需要的话,我会很乐意解释,希望您能帮助我。

Many Thanks, 非常感谢,

Sam. 山姆。

You cannot "link the two together" (assuming you mean the binary version of octave and the MacPorts version). 您不能将两者“链接在一起”(假设您的意思是二进制版本的octave和MacPorts版本)。

If you have packages installed via MacPorts for the MacPorts version of octave, then they will only be available from the the MacPorts version of octave, so make sure you are running that. 如果您已通过MacPorts安装了Macaves版本的八度软件包,则只​​能从MacPorts版本的八度使用软件包,因此请确保您正在运行。

Otherwise, figure out how to install the package with the octave binary version. 否则,请找出如何使用八度二进制版本安装软件包。 It seems you require a build environment for this, but installing the command line tools (which you must have done for MacPorts to work) might have already solved this problem. 看来您需要一个构建环境,但是安装命令行工具(MacPorts必须完成工作)才能解决此问题。

It seems to be a problem with gfortan compiler built-in with Octave. 用Octave内置的gfortan编译器似乎是一个问题。 To solve this you should install an external fortran compiler. 为了解决这个问题,您应该安装一个外部的fortran编译器。 Try this: 尝试这个:

  1. Install Xcode and command line tools for Xcode 为Xcode安装Xcode和命令行工具
  2. Download and install a fortran compiler for MacOS, for example: http://coudert.name/software/gfortran-6.1-ElCapitan.dmg 下载并安装用于MacOS的fortran编译器,例如: http : //coudert.name/software/gfortran-6.1-ElCapitan.dmg
  3. Change the fortran compiler path in your octave, to this if you installed the compiler that I suggested in point number 2 you only must to open Octave and type: setenv('F77', '/usr/local/gfortran/bin/gfortran') . 更改八度中的fortran编译器路径,如果安装了我在第2点中建议的编译器,则只需打开八度并键入: setenv('F77', '/usr/local/gfortran/bin/gfortran')

And Enjoy Octave for MacOS Octave with control package 3.0.0 on MacOS 并享受MacOS的Octave Octave以及MacOS 上的控制包3.0.0

You haven't provided enough information for a precise diagnostic, but I had the same error message (and a few more), and re-installing octave from source solved it; 您没有提供足够的信息来进行精确的诊断,但是我得到了相同的错误消息(还有更多错误消息),并且从源头重新安装八度音就解决了它。 see this link for more info, but essentially you can do it by running brew reinstall --build-from-source octave . 请参阅此链接以获取更多信息,但是实际上您可以通过运行brew reinstall --build-from-source octave

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM