wsl环境下重装arm-2009q3的尝试

JAVA RE缺少问题

Posted by John Mactavish on June 15, 2019

前言

我之前试图在wsl上使用版本为arm-2009q3的交叉编译器,但是下载的已编译版本经查是支持i686架构的,而我的wsl明显是x64_86架构的,所以wsl不能识别并执行这个.bin文件。但是今天我看到了Linux安装包形式发布的arm-2009q3,所以我决定试一试。

过程

我在[https://blog.csdn.net/LG1259156776/article/details/53206900]上面下载了.bin.tar.gz文件,拖到wsl目录下解压执行.bin文件。结果显示 The installer has detected that your system uses the dash shell as /bin/sh. This shell is not supported by the installer. You can work around this problem by changing /bin/sh to be a symbolic link to a supported shell such as bash. For example, on Ubuntu systems, execute this shell command: % sudo dpkg-reconfigure -plow dash Install as /bin/sh? No Please refer to the Getting Started guide for more information, or contact CodeSourcery Support for assistance. 上网查了下,貌似是默认shell的问题,于是我按照上述信息提示输入 sudo dpkg-reconfigure -plow dash 并在弹出的gui上选择了No,然后bash返回以下信息 Removing diversion of /bin/sh to /bin/sh.distrib by dash Adding diversion of /bin/sh to /bin/sh.distrib by bash Removing diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash Adding diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash 再执行文件,不再提示shell问题了,但是出现了 No Java virtual machine could be found from your path 问题,似乎是程序安装需要JVM,于是我在网上下载了java se版本(标准版本),据说se版本已经包含了java runtime,所以应该是可以的。在wsl上解压到我所习惯的/opt文件夹下,它变成了jdk,打开home下的.bashrc添加一行 export PATH=”/opt/jdk-12.0.1/bin:$PATH” 以把/bin目录添加到PATH下,记得source ~/.bashrc,还是没有用,报错没有改变。然后按一个人的办法在此基础上再添加一行export JAVA_HOME=”/opt/jdk-12.0.1” 照样没有用,再将这一行改为 export JAVADIR=”/opt/jdk-12.0.1” 这一回,虽然依然报错调试找不到,但是报错信息与之前不同 Preparing to install… Extracting the JRE from the installer archive… Unpacking the JRE… Extracting the installation resources from the installer archive… Configuring the installer for this system’s environment… No Java virtual machine could be found from your PATH environment variable. You must install a VM prior to running this program. 似乎说明JAVADIR的语法是正确的,程序认出来了,但是大概率是安装的东西不对,我将其改为 export JAVADIR=”/opt/jdk-12.0.1/bin” 也没有作用,难道是jdk和JVM还是不通用,反正我现在不懂JAVA,只能先搁置了。

@end

```

最后附上GitHub:https://github.com/gonearewe