arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

Failed to install `arduino-cli` using the script

Open LRDPRDX opened this issue 2 years ago • 9 comments
trafficstars

Describe the problem

Sorry if there is an issue regarding this, I didn't find any.

I am trying to install arduino-cli on raspberry pi 4.

curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/local/bin sh

and I'm getting the error:

Installing in /home/raspy/local/bin
ARCH=ARM64
OS=Linux
Using curl as download tool
Downloading https://downloads.arduino.cc/arduino-cli/arduino-cli_0.34.2_Linux_ARM64.tar.gz
tar: /tmp/arduino-cli_0.34.2_Linux_ARM64.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Failed to install arduino-cli

To reproduce

curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/local/bin sh

Expected behavior

arduino-cli should be installed.

Arduino CLI version

0.34.2 (trying to install)

Operating system

Linux

Operating system version

Ubuntu 23.04

Additional context

No response

Issue checklist

  • [X] I searched for previous reports in the issue tracker
  • [X] I verified the problem still occurs when using the nightly build
  • [X] My report contains all necessary details

LRDPRDX avatar Oct 17 '23 05:10 LRDPRDX

quick fix: find the checkLatestVersion() function in the shell script and properly escape the offending v? prefix in the regular expression

before:

CHECKLATESTVERSION_REGEX="v?[0-9][A-Za-z0-9\.-]*"

after:

CHECKLATESTVERSION_REGEX="v\?[0-9][A-Za-z0-9\.-]*"

tobozo avatar Oct 20 '23 14:10 tobozo

@tobozo I modified the shell script locally and pointed a local fork of ci-arduino (which installs this script on a GH actions runner) at it. Works perfectly for now, thanks for the patch!

brentru avatar Oct 20 '23 15:10 brentru

Could you provide a PR for that?

cmaglie avatar Oct 20 '23 15:10 cmaglie

@cmaglie Implemented @tobozo 's solution in https://github.com/arduino/arduino-cli/pull/2380

brentru avatar Oct 20 '23 15:10 brentru

quick fix: find the checkLatestVersion() function in the shell script and properly escape the offending v? prefix in the regular expression

Thanks @tobozo and @brentru! However, the regression introduced by https://github.com/arduino/arduino-cli/commit/74cdc80024357970cedcdb851e120faab196ab0b can not be the cause of the error reported by @LRDPRDX. The reason is that @LRDPRDX's report was made 2023-10-16 and the regression was introduced 2023-10-19.

So we can not consider this as resolved by https://github.com/arduino/arduino-cli/pull/2380

per1234 avatar Oct 20 '23 16:10 per1234

I just tried to install the CLI with the command above and it went smoothly on a raspberry PI. Are you sure you have the correct permissions for /home/raspy/local/bin?

umbynos avatar Dec 01 '23 13:12 umbynos

Hi, @umbynos . Actually I was able to reproduce this issue on my desktop. More over, I see your comment is after the fix commit has been merged.

EDIT: Sorry didn't noticed the comments and the status is still Open :)

LRDPRDX avatar Dec 02 '23 05:12 LRDPRDX

@umbynos Actually, now I just tried to reproduce it on my laptop -- everything works great. I will check the permissions etc on my raspberry on Monday (the device islocated at my working place).

LRDPRDX avatar Dec 02 '23 05:12 LRDPRDX

@LRDPRDX any update on this? :nerd_face:

alessio-perugini avatar Jan 04 '24 09:01 alessio-perugini