MMK*_*MMK 6 arduino software-installation
我arduino-nightly-linux32.tar.xz
从这里下载了 zip 文件到我的桌面。(您可能需要 64 位。询问您的计算机它是什么:32 位或 64 位):
我双击该arduino-nightly-linux.tar.xz
图标,它打开了一个显示.tar.xz file
. 我单击了窗口顶部的提取按钮并将arduino-nightly-linux.tar.xz
存档的内容提取到我的桌面。
提取后,我可以看到并打开桌面上的文件夹(以及我的所有其他东西),但无法从那里运行 Arduino。我打开了一个终端(Crtl+Alt+T)...
注意:大小写在终端中很重要,取决于您的机器对您正在使用的文件/位置的称呼...
我输入:cd Desktop
它给了我这个提示:jay@jay:~/Desktop$
我在$ ls --
单击 Enter后在行上输入,它列出了我桌面上的每个文件和文件夹。
我可以在列表中每晚看到 Arduino(由于某种原因它是蓝色的)。如果你没有在列表中看到它,你在错误的目录中,你需要“cd”到它所在的目录。
然后我在 Desktop$ 之后输入了一行cd Arduino-nightly
,它给了我这个:
jay@jay:~/Desktop/arduino-nightly$
在该行的 $ 之后,我输入 ./arduino
但是在完成上述步骤后,我编程了arduino
一次,然后关闭了应用程序,现在找不到它了。每次当我想打开 arduino 应用程序时,我都必须在终端中发出命令。如何永久安装?
为什么不直接从存储库安装?
sudo apt-get install arduino
Run Code Online (Sandbox Code Playgroud)
否则下载包,然后在下载目录中:
tar -xf arduino-1.6.5-r5-linux64.tar.xz
cd arduino-1.6.5-r5/
./arduino
Run Code Online (Sandbox Code Playgroud)
要永久安装(某种程度上),请将“arduino-1.6.5-r5”目录的内容复制到某个位置(可能是 $HOME/arduino”),然后将 arduino.desktop 文件复制到 $HOME/.local/share/application ,编辑它以包含正确的路径,然后您就可以“永久”为您的用户安装它。
#/usr/bin/env bash
# set variables for download
URL=https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
DOWNLOAD="$HOME/Downloads/arduino-nightly.tar.xz"
# download file via wget from $URL to $DOWNLOAD
wget "$URL" -O "$DOWNLOAD"
# extract file to $HOME directory
tar xf "$DOWNLOAD" -C "$HOME"
# use sed to modify the provided arduino.desktop
# file and redirect the result into $HOME/.local.share/applications
# to be able to start from dash
# sed's replace command s/searchpattern/replacepattern/
# the slashes are replaced by '#' to not need to escape slashes in path
# replace placeholder "FULL_PATH" with install directory
sed "s#FULL_PATH#$HOME/arduino-nightly#" "$HOME/arduino-nightly/arduino.desktop" >"$HOME/.local/share/applications/arduino.desktop"
Run Code Online (Sandbox Code Playgroud)
该脚本下载最新的夜间版本(网站显示每小时一次),将其提取到 $HOME/arduino-nightly(该文件夹位于 tar 中,所以我只是使用它)并在修改时复制桌面文件。注销并登录后,您应该能够通过破折号正常启动它。