我如何让 Scilab 6.1.0 在 ubuntu 20.04 上运行?

How do i get Scilab 6.1.0 working on ubuntu 20.04?

我已经安装了 Scilab 6.1.0 的 ubuntu 存储库并且我一直在尝试 运行 它,我收到的错误消息是

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 "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 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).

我试过: - 运行来自客户端 - 运行来自启动器的 ning

cli 版本有效

已前往论坛并查看不同的解决方案 - 删除 SCIHOME 目录。 - 重新安装 Scilab。 - 从不同来源重新安装。 - 清除所有与 Scilab 相关的目录并重新安装。

Ubuntu 包已损坏。请使用来自 Scilab 站点的官方 .tar.gz 发行版:https://www.scilab.org/download/6.1.0

如果提示 libtinfo.so.5 文件不可用,运行 在终端中输入以下命令:

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

损坏的包最好通过在 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

从ubuntugroovy下载以下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

希望这有助于任何试图让 scilab 6.1.0 在 ubuntu focal 上工作的人!