在 Ubuntu 18.04上,如何让 Scilab 6.0.1工作?

分享于 

5分钟阅读

ubuntu

  繁體

问题

我新安装了Ubuntu 18.04 LTS MATE,并从存储库安装Scilab


sudo apt-get update


sudo apt-get install scilab



安装后,我试图从GUI (应用程序→其他→Scilab )启动它,但是它没有启动,然后我尝试用scilab命令从终端启动它,终端输出如下:


$ scilab


/usr/bin/scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory



我检查了libjava.so的存在:


$ dpkg -S libjava.so 


openjdk-11-jre-headless:amd64: /usr/lib/jvm/java-11-openjdk-amd64/lib/libjava.so



应该怎么做才能让Scilab 6.0.1在Ubuntu 18.04 LTS上工作?


答案1

*基于存储库的方法(ATOMS将不能工作)

首先,我们需要安装Scilab:


sudo apt-get install scilab



我怀疑问题出在OpenJDK 11,我决定在Ubuntu16.04LTS安装以前版本的OpenJDK-8.


sudo apt-get install openjdk-8-jre openjdk-8-jre-headless



我们需要使用命令将OpenJDK 8设置为默认值:


sudo update-java-alternatives --set 


java-1.8.0-openjdk-$(dpkg --print-architecture)



在此scilab命令后产生警告消息:


$ scilab 


Warning: Could not find Java package '/usr/share/java/jlatexmath-fop-1.0.6.jar'. 


Some problems during the loading of the Java libraries occurred. This could lead to inconsistent behaviours.


Please check SCI/etc/classpath.xml.



我从Internet下载了所需的包,并手动安装了它:


cd ~/Downloads


wget http://http.kali.org/pool/main/libj/libjlatexmath-java/libjlatexmath-fop-java_1.0.6-1_all.deb


sudo apt-get install ./libjlatexmath-fop-java_1.0.6-1_all.deb --allow-downgrades



sudo tee /etc/apt/preferences.d/pin-jlfop >/dev/null <<EOF


Package: libjlatexmath-fop-java


Pin: version 1.0.6-1


Pin-Priority: 1337


EOF



scilab从终端正常启动。

需要将控制终端添加到它桌面文件,以修复这个错误:


sudo sed -i 's/^Terminal=false$/Terminal=true/' /usr/share/applications/scilab.desktop



如果您需要功能全面的Scilab,则应使用官方网站上的二进制归档文件6.0.1,然后运行以下命令(下载,提取,添加到PATH,设置快捷键和MIME关联):


mkdir ~/Software


cd ~/Software


wget http://www.scilab.org/download/6.0.1/scilab-6.0.1.bin.linux-x86_64.tar.gz


tar -xzf scilab-6.0.1.bin.linux-x86_64.tar.gz


cd scilab-6.0.1


echo"PATH=$PATH:/home/$USER/Software/scilab-6.0.1/bin" >> ~/.bashrc


echo"PATH=$PATH:/home/$USER/Software/scilab-6.0.1/bin" >> ~/.profile


mkdir -p ~/.local/share/applications


sed -i 's/^Terminal=false$/Terminal=true/' ~/Software/scilab-6.0.1/share/applications/{scilab,scinotes,xcos}.desktop


cp -a ~/Software/scilab-6.0.1/share/{icons,applications,mime} ~/.local/share/


update-mime-database ~/.local/share/mime/




答案2

转到http://www.scilab.org/en/download/6.0.1并下载e,g.scilab-6.0.1.bin.linux-x86_64.tar.gz

解压缩下载的归档文件,并在以下位置运行可执行文件:


sudo tar xvf ~/Downloads/scilab-6.0.1.bin.linux-x86_64.tar.gz


cd scilab-6.0.1


cd bin


./scilab



它可以在Ubuntu 18.04和Fedora 28中使用。



Ubuntu  APT  lts  Scilab  
相关文章