octave - 在 openSUSE 中修复没有科学存储库的 GNU Octave
问题描述
我是 openSUSE 13.2 的用户。更新 openSUSE 时,系统停止正常工作(例如,无法打开 Firefox,或 yast2 中的软件管理。Snapper 无法修复该问题)。所以我使用 DVD openSUSE 13.2 来升级(更新)并设法修复它。但是,某些应用程序(例如 GNU Octave)无法正常工作。我可以打开它并运行它,但它给我编译示例代码时出错。诸如缺少库等错误。我不想跳到 openSUSE 15 有这么多的麻烦。我现在只想修复 Octave。但是,openSUSE 13.2 的科学存储库不再活跃。我有 GNU Octave v. 3.8,如果可能的话,我想用所有可用的 octave 包将 octave 更新到最新版本。如果没有可用于 openSUSE 13.2 的科学存储库,我是如何做到的。
下面是一个示例代码:
x = -10:0.1:10;
c=pi
d=exp(0)
f1 = sin(x);
f2 = c.^(1/4)* x.*exp((-1/2)*x.^2);
plot(x,f1,'-r',x,f2,'-b')
title ("psi(x) at n=0 and n=1 for x = -10:0.1:10");
xlabel ("x");
ylabel ("psi(x)");
text (0.6, 1.2, "psi at n=0");
text (-0.6, -0.8, "psi at n=1");
legend ('psi-0(x)','psi-1(x)');
GNU Octave 输出是
error: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/PKG_ADD: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/__init_fltk__.oct: failed to load: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/__init_fltk__.oct: undefined symbol: _ZN9Fl_Window6cursorE9Fl_Cursor
error: called from:
error: /usr/lib64/octave/3.8.2/oct/x86_64-suse-linux-gnu/PKG_ADD at line 6, column 1
GNU Octave, version 3.8.2
Copyright (C) 2014 John W. Eaton and others.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "x86_64-suse-linux-gnu".
For information about changes from previous versions, type 'news'.
warning: function /home/adam/OctaveExamples/waitbar.m shadows a core library function
warning: function /home/adam/OctaveExamples/plot3.m shadows a core library function
plot1
c = 3.1416
d = 1
error: default graphics toolkit 'fltk' is not available!
error: base_graphics_toolkit::initialize: invalid graphics toolkit
error: called from:
error: /usr/share/octave/3.8.2/m/plot/util/figure.m at line 94, column 9
error: /usr/share/octave/3.8.2/m/plot/util/gcf.m at line 63, column 9
error: /usr/share/octave/3.8.2/m/plot/util/newplot.m at line 113, column 8
error: /usr/share/octave/3.8.2/m/plot/draw/plot.m at line 219, column 9
error: /home/adam/OctaveExamples/plot1.m at line 6, column 1
代码在 openSUSE 失控之前就可以工作了。修复后,八度似乎被打破了。
解决方案
推荐阅读
- python - LSTM 层精度为 0
- shell - Ansible 无法执行远程 shell 脚本来运行 jar
- javascript - JAVASCRIPT 警告:主线程上的同步 XMLHttpRequest 已被弃用,因为它对最终用户的体验产生不利影响
- argo-workflows - 在不同的 argo 工作流程中重用模板/步骤
- java - iText 7 HtmlConverter.convertToPdf 正在破坏
- vulkan - 混合闪闪发光的灯光
- java - Java JFrame 按钮没有响应
- python - 如何在 Flask 网页中嵌入模板化的散景应用程序?
- javascript - 合并子变量以获取构造变量
- local-storage - 在 office word add in 中使用 openBrowserWindow 时,localstorage 不起作用