Error while installing in Mac via brew
I am getting errors while installing cli via brew, and I noticed that it's fetching the cli v0.2.5 not the latest v0.2.6
brew install screenly-cli
==> Downloading https://formulae.brew.sh/api/formula.jws.json
########################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
########################################################################################################################## 100.0%
==> Fetching screenly/screenly-cli/screenly-cli
==> Cloning https://github.com/Screenly/cli.git
Updating /Users/salman/Library/Caches/Homebrew/screenly-cli--git
==> Checking out tag v0.2.6
HEAD is now at ec61476 Merge pull request #163 from Screenly/fix/help_texts
HEAD is now at ec61476 Merge pull request #163 from Screenly/fix/help_texts
==> Installing screenly-cli from screenly/screenly-cli
==> cargo install --bin screenly
Last 15 lines from /Users/salman/Library/Logs/Homebrew/screenly-cli/01.cargo:
|
help: consider giving `items` an explicit type, where the placeholders `_` are specified
|
83 | let items: Box<_> = format_items
| ++++++++
Compiling tracing v0.1.40
Compiling core-foundation v0.9.3
Compiling backtrace v0.3.69
Compiling gimli v0.28.1
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cli v0.2.5 (/private/tmp/screenly-cli-20240802-22074-vj9nge)`, intermediate artifacts can be found at `/private/tmp/screenly-cli-20240802-22074-vj9nge/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
https://github.com/screenly/homebrew-screenly-cli/issues
System Info: MAC OS: 14.6 (23G80) Chip : Apple M1
I downloaded the executable file manually and added it to my path to solve the issue temporarily. I learned something while doing it so sharing here.
Step for that
- Download the latest release from here https://github.com/Screenly/cli/releases - I chose [screenly-cli-aarch64-apple-darwin.tar.gz] as I am using the MAC
- Unzip and save it somewhere where you want to call from the executable
- Open your shell config file -
For me, it's zsh shell, so I used nano to open the file by using the command nano ~/.zshrc
- After opening the file, add the following line
export PATH="Your Screenly CLI Executable Saved location :$PATH"
- Save the file and close the editor. Then, reload the shell configuration with:
source ~/.zshrc
- Create a Symbolic Link: {I didn't do this in previously and was not able to run the executable} If adding the directory to your PATH does not resolve the issue, try creating a symbolic link to the screenly binary in a directory that is already in your PATH
sudo ln -s {Your Screenly CLI Executable Saved location} /usr/local/bin/screenly
- Run screenly:
Try running
screenlyagain.
Yep, I've reproduced the issue above. Ping @sergey-borovkov.
Last 15 lines from /Users/mvip/Library/Logs/Homebrew/screenly-cli/01.cargo:
|
help: consider giving `items` an explicit type, where the placeholders `_` are specified
|
83 | let items: Box<_> = format_items
| ++++++++
Compiling gimli v0.28.1
Compiling semver v1.0.20
Compiling adler v1.0.2
Compiling miniz_oxide v0.7.1
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cli v0.2.5 (/private/tmp/screenly-cli-20240807-93729-vtgzpi)`, intermediate artifacts can be found at `/private/tmp/screenly-cli-20240807-93729-vtgzpi/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
https://github.com/screenly/homebrew-screenly-cli/issues
Installing by hand
If you have installed Brew properly, it should both add its bin directory in $PATH. Perhaps this isn't sourced properly in your ~/.zshrc file (did you switch shell after you installed. I have this in my .zshrc file:
[...]
if [[ -r "/opt/homebrew/bin/brew" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
[...]
If you are installing it by hand, it's really up to personal preferences how you structure things. My personal preference is to have a folder called $HOME/bin where I put binaries into. I then just have simething like this in my .zshrc:
export "PATH=$HOME/bin:[...]:$PATH"
You could of course symlink but this doesn't seem to me like a Screenly CLI issue but rather than a brew/installation issue.
I checked with Brew, and it's installed correctly. However, only the Screenly CLI has the issue with installation.
If you are installing it by hand, it's really up to personal preferences how you structure things. My personal preference is to have a folder called $HOME/bin where I put binaries into. I then just have simething like this in my .zshrc:
That's a good suggestion to make the binaries neat and organized. I will fork it 😄.
I also see, the brew formula is not updated per the new CLI version. I raised an issue a few days back - https://github.com/Screenly/homebrew-screenly-cli/issues/9
I think this is fixed by #205 🙂
Resolved for Homebrew in https://github.com/Screenly/homebrew-screenly-cli/pull/11