如何在Ubuntu 20.04上使Scilab 6.1.0工作?

huangapple go评论145阅读模式
英文:

How do i get Scilab 6.1.0 working on ubuntu 20.04?

问题

我已安装了Scilab 6.1.0的Ubuntu仓库版本,并尝试运行它,但出现以下错误消息:

警告:发生了非法反射访问操作
警告:非法反射访问由org.scilab.modules.jvm.LibraryPath(文件:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar)对java.lang.ClassLoader.sys_paths字段的访问操作
警告:请考虑将此情况报告给org.scilab.modules.jvm.LibraryPath的维护者
警告:使用--illegal-access=warn以启用对进一步的非法反射访问操作的警告
警告:所有非法访问操作将在未来的版本中被拒绝
无法访问主要的Scilab类:
“main”线程中的异常java.lang.ExceptionInInitializerError
	at org.scilab.modules.localization.Messages.gettext(Unknown Source)
	at org.scilab.modules.commons.xml.XConfiguration.<clinit>(Unknown Source)
	at org.scilab.modules.core.Scilab.<clinit>(Unknown Source)
Caused by: java.lang.NullPointerException
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2646)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
	at java.base/java.lang.System.loadLibrary(System.java:1870)
	at org.scilab.modules.localization.MessagesJNI.<clinit>(Unknown Source)
	... 3 more

Scilab无法创建Scilab Java主类(我们无法找到主要的Scilab类。请检查Scilab和第三方软件包是否可用)。

我尝试过:

  • 从命令行运行
  • 从启动器运行

命令行版本可以正常运行。

我还查阅了论坛并尝试了不同的解决方案:

  • 删除SCIHOME目录。
  • 重新安装Scilab。
  • 从不同的来源重新安装。
  • 清除与Scilab相关的所有目录并重新安装。
英文:

I've installed the ubuntu repo of Scilab 6.1.0 and ive been trying to run it, The error message i get is

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.scilab.modules.jvm.LibraryPath ?(file:/usr/share/scilab/modules/jvm/jar/org.scilab.modules.jvm.jar) to field java.lang.ClassLoader.sys_paths
WARNING: Please consider reporting this to the maintainers of org.scilab.modules.jvm.LibraryPath
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Could not access to the Main Scilab Class:
Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError
	at org.scilab.modules.localization.Messages.gettext(Unknown Source)
	at org.scilab.modules.commons.xml.XConfiguration.&lt;clinit&gt;(Unknown Source)
	at org.scilab.modules.core.Scilab.&lt;clinit&gt;(Unknown Source)
Caused by: java.lang.NullPointerException
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2646)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
	at java.base/java.lang.System.loadLibrary(System.java:1870)
	at org.scilab.modules.localization.MessagesJNI.&lt;clinit&gt;(Unknown Source)
	... 3 more

Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available).

I have tried:

  • running from the cli
  • running from the launcher

the cli version works

have gone to the forums and checked for the different solutions

  • deleting the SCIHOME directory.
  • reinstalling Scilab.
  • reinstalling from different sources.
  • purging all the directories related to Scilab and reinstalling.

答案1

得分: 2

Ubuntu包损坏,请使用Scilab网站上官方的.tar.gz分发版本:https://www.scilab.org/download/6.1.0

英文:

The Ubuntu package is broken. Please use the official .tar.gz distribution from Scilab site: https://www.scilab.org/download/6.1.0

答案2

得分: 1

如果显示找不到 libtinfo.so.5 文件,就在终端中运行以下命令:

sudo ln -s /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.5
英文:

If it says that libtinfo.so.5 file is not available, run the following command in the terminal :

sudo ln -s /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.5

答案3

得分: 0

被损坏的软件包最好通过在您的Ubuntu Focal机器上从Ubuntu Groovy重新构建Scilab软件包并安装生成的deb文件来修复。

可以按以下步骤操作:

创建一个用于构建过程的文件夹:

mkdir scilab-focal
cd scilab-focal

确保系统上已安装所有内容:
在/etc/apt/sources.list中启用deb-src行,并安装wget和apt-src(如果尚未安装)。

sudo sed -i 's/# deb-src/deb-src/g' /etc/apt/sources.list
sudo apt update && apt install -yy wget apt-src && apt-src update

从Ubuntu Groovy下载以下Scilab源软件包:

wget http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_6.1.0+dfsg1-6build2.dsc
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_6.1.0+dfsg1.orig.tar.xz
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_6.1.0+dfsg1-6build2.debian.tar.xz

根据自动化构建过程的需要提取Scilab软件包:

tar xf scilab_6.1.0+dfsg1.orig.tar.xz
cd scilab-6.1.0
tar xf ../scilab_6.1.0+dfsg1-6build2.debian.tar.xz

构建并安装Scilab:

apt-src import --here .
apt-get build-dep -yy scilab    
apt-src build -i -k scilab

希望这对那些试图在Ubuntu Focal上使用Scilab 6.1.0的人有所帮助!

英文:

The broken package is best fixed by rebuilding the scilab package from ubuntu groovy on your ubuntu focal machine and installing the generated deb files.

This can be done as follows:

create a folder for the build process:

mkdir scilab-focal
cd scilab-focal

Make certain we have everything on your system:
Enable the deb-src lines in /etc/apt/sources.list and Install wget and apt-src if not yet installed

sudo sed -i s/#\ deb-src/deb-src/g /etc/apt/sources.list  
sudo apt update &amp;&amp; apt install -yy wget apt-src &amp;&amp; apt-src update

download the following scilab source packages from ubuntu groovy:

wget http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_6.1.0+dfsg1-6build2.dsc
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_6.1.0+dfsg1.orig.tar.xz
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_6.1.0+dfsg1-6build2.debian.tar.xz

extract the scilab packages as required for the automated build process:

tar xf scilab_6.1.0+dfsg1.orig.tar.xz
cd scilab-6.1.0
tar xf ../scilab_6.1.0+dfsg1-6build2.debian.tar.xz

Build and install scilab

apt-src import --here .
apt-get build-dep -yy scilab    
apt-src build -i -k scilab

Hope this helps anybody trying to get scilab 6.1.0 working on ubuntu focal!

答案4

得分: 0

连接libtinfo.so.5文件是解决方案的第一步。但是,Scilab仍然无法绘制或显示任何图形。一个可能的方法是使用以下命令运行Scilab:

LIBGL_ALWAYS_SOFTWARE=1 scilab

我已经尝试过这个方法,并解决了在Ubuntu 22.04 LTS上出现的相同问题。不知道为什么这样可以解决。仍在寻找永久性的解决方案。

英文:

linking libtinfo.so.5 file is first step of the solution. But still scilab can not plot or show any graphics. One possible way is to run the scilab with

LIBGL_ALWAYS_SOFTWARE=1 scilab

command. I have tried this and solve the same issue of scilab with Ubuntu 22.04 LTS. Dont know, why this works. Still looking for permanent solution..

huangapple
  • 本文由 发表于 2020年6月5日 22:38:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/62217891.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定