一、法一:从官网获取Ganache的压缩包
官网🔗:https://www.trufflesuite.com/ganache
下载版本:ganache-2.7.1-linux-x86_64.AppImage
⚠️:由于ganache官网也是从github上拉下来的资源,github一般需要加速器才能连上,如果不开加速器(300+MB的文件大小需要下载12h左右)
如果你有加速器,也可以选择直接进入上述图片中的地址:
https://github-releases.githubusercontent.com从下载ganache-2.7.1-linux-x86_64.AppImage资源(有加速器只需要5分钟左右)
二、法二:直接在这篇文章顶端的🔗下载资源
⚠️:下载前,先看目录第三点决定下载位置!!
我已经拉下来ganache-2.7.1-linux-x86_64.AppImage了🤩(放心食用)
如果文章中的资源暂时还无法下载
我放到百度网盘中:
🔗: https://pan.baidu.com/s/107VK4IX28fIfl1TdX_C1Cw?pwd=a244 提取码: a244
三、将刚才的Ganache资源放入Ubuntu
这里有很多办法
1.方法一(推荐)
在Ubuntu系统中打开firefox火狐浏览器(确保你的虚拟机连上网了),在浏览器中打开这篇文章,从文顶🔗下载ganache-2.7.1-linux-x86_64.AppImage,就下载到Ubuntu中了👌
2.方法二(不推荐)
假如你看到这的时候已经在主机(windows系统中下载了ganache资源),你可以选择把ganache-2.7.1-linux-x86_64.AppImage在主机里拷贝到U盘中,再将U盘链接虚拟机,把ganache-2.7.1-linux-x86_64.AppImage放入Ubuntu
⚠️:U盘的连接可以通过VM右下角状态栏设置与主机相连还是与当前的虚拟机相连
3.方法三(如果你有xtfp,推荐)
较前两个方法就比较麻烦了,下载xtfp软件,实现虚拟机和主机的文件互连,把主机里已经下载了的ganache-2.7.1-linux-x86_64.AppImage资源通过xtfp连接虚拟机,传入到Ubuntu中去
⚠️:获取资源后请将放置ganache-2.7.1-linux-x86_64.AppImage在你的/home目录下
四、启动Ganache
当ganache-2.7.1-linux-x86_64.AppImage已经放置在/home下后,你可以尝试点击ganache-2.7.1-linux-x86_64.AppImage来启动ganache了🤩
⚠️注意:你可能会遇到反馈信息说:无法打开
解决办法:
新建一个终端输入👇命令给下载的文件添加可执行权限:
chmod +x ganache-2.7.1-linux-x86_64.AppImage
执行命令后你可以选择从终端输入👇命令来启动Ganache:
./ganache-2.7.1-linux-x86_64.AppImage
或者,你可以直接在/home目录中点击ganache-2.7.1-linux-x86_64.AppImage文件以启动Ganache
可能要等1~2分钟
然后就会进入Ganache图形界面🤩🤩:
解决其他问题(希望你不需要🙏)
1)Ganache启动没反应
如果在执行完‘chmod +x ganache-2.7.1-linux-x86_64.AppImage’以后,点击文件启动没反应的问题:
1.尝试在/home目录下的终端再次用👇命令启动:
./ganache-2.7.1-linux-x86_64.AppImage
如果反馈:
dlopen(): error loading libfuse.so.2
AppImages require FUSE to run.
You might still be able to extract the contents of this AppImage
if you run it with the --appimage-extract option.
See https://github.com/AppImage/AppImageKit/wiki/FUSE
for more information
翻译一下:你遇到的错误消息表明无法加载所需的库文件"libfuse.so.2",这是一个由应用程序或AppImage所需的库文件。该库文件是文件系统用户空间(FUSE)系统的一部分。要解决此问题,您需要安装或确保FUSE已正确安装在您的系统上。FUSE允许非root用户创建自己的文件系统,这通常需要在运行AppImages时使用。
你只需要安装libfuse2即可:
输入👇命令来安装:
sudo apt install libfuse2
到此,Ganache的安装已经全部完成👏
2)下载ganache资源在主机中并且将文件从U盘拷入Ubuntu系统
你可能会遇到拷贝文件到Ubuntu中的/home以后,点击文件没反应的问题,请尝试1)中的方法用命令’sudo apt install libfuse2‘安装以后再次启动ganache。
还有别的问题可以私信✉️~