./scilab
Scilab 6 在 Ubuntu 18.04 上似乎有一些错误,所以我想尝试运行 5.5.2。我从 Scilab 网站下载了二进制文件。当我尝试在文件夹中运行时bin
,它给出了一个称为libEGL
许可证的身份验证问题:
$ ./scilab
libEGL warning: DRI2: failed to authenticate
Segmentation fault (core dumped)
有没有什么办法可以解决这个问题?
答案1
在装有 Ubuntu MATE 18.04.5 LTS 的干净虚拟机上,二进制版本(scilab-5.5.2.bin.linux-x86_64.tar.gz) 崩溃是Segmentation fault (core dumped)
由于与 Java 相关的问题引起的thirdparty/java
。
因此,我们需要从 16.04 LTS 存储库手动下载软件包及其所有依赖项来安装 Scilab 5.5.2。以下是完整说明:
cd ~/Downloads
# scilab files
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-cli_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-data_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-doc_5.5.2-2ubuntu3_all.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-full-bin_5.5.2-2ubuntu3_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-include_5.5.2-2ubuntu3_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-minimal-bin_5.5.2-2ubuntu3_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/s/scilab/scilab-test_5.5.2-2ubuntu3_all.deb
# scilab dependencies
wget -c http://security.ubuntu.com/ubuntu/pool/universe/h/hdf5/libhdf5-10_1.8.16+docs-4ubuntu1.1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libsuitesparseconfig4.4.6_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libamd2.4.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/libm/libmatio/libmatio2_1.5.3-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libcamd2.4.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libccolamd2.9.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libcolamd2.9.1_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libcholmod3.0.6_4.4.6-1_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libumfpack5.7.1_4.4.6-1_amd64.deb
sudo apt-get update
sudo apt-get install libcurl3
sudo apt-get install ./libhdf5-10_1.8.16+docs-4ubuntu1.1_amd64.deb \
./libsuitesparseconfig4.4.6_4.4.6-1_amd64.deb \
./libamd2.4.1_4.4.6-1_amd64.deb \
./libmatio2_1.5.3-1_amd64.deb \
./libcamd2.4.1_4.4.6-1_amd64.deb \
./libccolamd2.9.1_4.4.6-1_amd64.deb \
./libcolamd2.9.1_4.4.6-1_amd64.deb \
./libcholmod3.0.6_4.4.6-1_amd64.deb \
./libumfpack5.7.1_4.4.6-1_amd64.deb \
./scilab*.deb
然后我们需要获取 OpenJDK 8
sudo apt-get install openjdk-8-jre openjdk-8-jre-headless
然后我们需要编辑 Scilab 桌面文件以使用 OpenJDK 8:
sudo sed -i "s/^Exec=scilab -f$/Exec=env JAVA_HOME=\/usr\/lib\/jvm\/java-8-openjdk-$(dpkg --print-architecture)\/jre scilab -f/" /usr/share/applications/scilab.desktop
sudo sed -i "s/^Exec=scilab-adv-cli$/Exec=env JAVA_HOME=\/usr\/lib\/jvm\/java-8-openjdk-$(dpkg --print-architecture)\/jre scilab-adv-cli/" /usr/share/applications/scilab-adv-cli.desktop
(可选)我们可以为 scilab 创建一个别名以使用 OpenJDK 8:
echo "alias scilab='env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) scilab'" >> ~/.bashrc
echo "alias scilab-adv-cli='env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) scilab-adv-cli'" >> ~/.bashrc
echo "alias xcos='env JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture) xcos'" >> ~/.bashrc
最后,我们需要固定/保留所有手动安装的软件包以防止其升级:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-scilab
Package: libamd2.4.1
Pin: version 4.4.6-1
Pin-Priority: 1337
Package: libcamd2.4.1
Pin: version 4.4.6-1
Pin-Priority: 1337
Package: libccolamd2.9.1
Pin: version 4.4.6-1
Pin-Priority: 1337
Package: libcholmod3.0.6
Pin: version 4.4.6-1
Pin-Priority: 1337
Package: libcolamd2.9.1
Pin: version 4.4.6-1
Pin-Priority: 1337
Package: libhdf5-10
Pin: version 1.8.16+docs-4ubuntu1.1
Pin-Priority: 1337
Package: libmatio2
Pin: version 1.5.3-1
Pin-Priority: 1337
Package: libsuitesparseconfig4.4.6
Pin: version 4.4.6-1
Pin-Priority: 1337
Package: libumfpack5.7.1
Pin: version 4.4.6-1
Pin-Priority: 1337
Package: scilab
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
Package: scilab-cli
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
Package: scilab-data
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
Package: scilab-doc
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
Package: scilab-full-bin
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
Package: scilab-include
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
Package: scilab-minimal-bin
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
Package: scilab-test
Pin: version 5.5.2-2ubuntu3
Pin-Priority: 1337
EOF
生成的版本功能齐全 - 您可以使用 ATOMS、Xcos 等等。
但是我们仍然需要 Scilab Ubuntu(或 Debian)维护人员的官方反应。Scilab
是一款功能非常丰富的应用程序,但遗憾的是它维护不善……