When installed, the Internet search a lot, met a lot of problems, time-consuming, so we decided to summarize it.
Mainly in order to avoid the pit of it, all finishing down their problems and solutions.
Briefly look at the set up shared folders
- Create a folder, used as a shared folder on a Windows host.
- Open VMware➡ target virtual machine, right-click Edit virtual machine settings setting ➡ ➡ Options ➡ ➡ open the shared folder is always enabled, add ➡ OK (Figure)
- If no mnt folder on the desktop, the left computer file ➡ ➡ elsewhere ➡mnt➡hgfs➡ shared folder (as shown)
Note: No files on the left, bottom left, displays the application.
Next, begin to build interactive compiler environment.
Downloading arm-linux-gcc compiler,
See
https://blog.csdn.net/zz56z56/article/details/83021583
In fact, the big brother has written it, I approach him and some differences, some of the simple
(My article is mainly to solve some pit encountered I followed big brother do it)
1. Once you have downloaded the compiler stored in a shared folder (you can also directly drag the virtual machine, follow-up would not open the terminal in a shared folder, direct open line)
2, open the virtual machine folder ➡ page in the shared file open a terminal, the compiler installation to /opt/FriendlyARM/toolschain/4.4.3/ directory ;
Enter the command: the sudo the tar -zxvf ARM-Linux-GCC-4.4.3.tar.gz -C /
Input Note: 1, C caps, front and back spaces 2, The Scarlet Letter by changing his name archive
3, modify the system configuration file:
Command: sudo gedit / etc / profile
Available mousepad instead of gedit
4, the editor window is opened, the bottom added,
保存退出 (注:这里出现的warning可不用理会)
5、刷新环境变量 (此后步骤与上述网站同)
命令:source /etc/profile
6、检查环境变量添加是否正确
命令: echo $PATH
如果可以显示/usr/local/arm/4.4.3/bin,那么环境变量添加成功
7、输入arm-linux-gcc -v
出现错误:
/usr/local/arm/arm-linux-gcc-4.4.3/bin/arm-linux-gcc: 15: exec: /usr/local/arm/arm-linux-gcc-4.4.3/bin/.arm- none-linux-gnueabi-gcc: not found
解决上面问题的方法:因为你使用的是64位系统,但是编译工具是32位,需要安装32位支持库。
命令:sudo apt-get install lib32ncurses5 lib32z1 (红字部分可以更改,具体为自己安装的软件)
安装完,再次测试
命令:arm-linux-gcc -v,
完工!附一张成功后的图
开始避坑:
1、第四步中,如果文本无法编辑保存,回终端进入管理员模式
命令:sudo su
(退出管理员模式 命令:su 你的名字)
2、最后一步安装32位支持库时出现: 有未能满足的依赖关系
原因是:在ubuntu中我们使用sudo apt-get install 或者dpkg -i *.deb安装软件时,常常提示“有未能满足的依赖关系“,这是因为当前软件源中依赖库的版本不满足软件的要求。
解决办法:
1:换源(换源方法在下边)
2:sudo apt-get install lib32ncurses5 lib32z1。 这里会提示“有未能满足的依赖关系“;
3:sudo apt-get -f install。 这个命令会针对当前不满足的依赖关系,下载正确版本的依赖库;
4:sudo apt-get install lib32ncurses5 lib32z1。 这一步就会正确安装软件了。
3、在最后一句测试时,可能出现
最玄学,一度让我怀疑人生,通过查找才发现原因:
解决方法附上:(注:第二行地址填自己的)
换源:1、备份自带源
命令: sudo cp /etc/apt/sources.list /etc/apt/sources.list.back
2、打开源文件,将原内容删除,粘贴新复制的源:
命令: sudo gedit /etc/apt/sources.list
3、更新
命令:sudo apt-get update
下面是阿里源的地址:
阿里源 :
地址: https://opsx.alibaba.com/mirror
源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
下面是文章中出现的一下材料的出处:
————————————————
“整体步骤”引用 CSDN博主「只写不看小叶子」
原文链接:https://blog.csdn.net/zz56z56/article/details/83021583
“有未能满足的依赖关系”引用 CSDN博主「diligent_321」
原文链接:https://blog.csdn.net/diligent_321/article/details/52748333
“换源以及阿里源”出处引用 CSDN博主「yq_nixing」
原文链接:https://blog.csdn.net/m0_37601622/article/details/82968780