Skip to content

[Bug - macOS 15] 🐞 cp: directory /usr/local/bin does not exist when running generic_unix_install.sh #97

@jjloneman

Description

@jjloneman

⚠️ Issue

When installing pineflash on macOS 15 (Sequoia), usr/local/bin doesn't exist by default, so I get the following error:

cp: directory /usr/local/bin does not exist

Apparently on newer macOS versions, /usr/local/bin may not exist by default.

Here is the full command output:

$ ./generic_unix_install.sh 
   Compiling pineflash v0.5.5 (/Users/jjloneman/Workspace/PineFlash)
warning: unused imports: `ImageSource` and `epaint::ColorImage`
  --> src/main.rs:12:27
   |
12 | use eframe::{egui::{self, ImageSource}, epaint::ColorImage};
   |                           ^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: constant `ICON` is never used
  --> src/main.rs:25:7
   |
25 | const ICON: &[u8] = include_bytes!("../assets/pine64logo.ico");
   |       ^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `pineflash` (bin "pineflash") generated 2 warnings (run `cargo fix --bin "pineflash"` to apply 1 suggestion)
    Finished `release` profile [optimized] target(s) in 2.36s
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  102k  100  102k    0     0   981k      0 --:--:-- --:--:-- --:--:--  981k
Archive:  blisp-apple-x86_64-v0.0.4.zip
replace blisp? [y]es, [n]o, [A]ll, [N]one, [r]ename: n
cp: /usr/local/bin/blisp: No such file or directory
chmod: /usr/local/bin/blisp: No such file or directory
cp: directory /usr/local/bin does not exist

On my machine, only /usr/local/lib exists.

🛠️ Solution

To fix this, mkdir -p <dir> should be added before the first cp command in generic_unix_install.sh to create any target directories (and intermediate ones) if needed:

+ $root mkdir -p /usr/local/bin
  $root cp ./blisp /usr/local/bin/blisp
  $root chmod +x /usr/local/bin/blisp
  $root cp ./assets/Pineflash.desktop /usr/share/applications/Pineflash.desktop
  $root cp ./assets/pine64logo.png /usr/share/pixmaps/pine64logo.png
  $root cp ./target/release/pineflash /usr/bin/pineflash

🔎 Environment info

Key Value
OS macOS Sequoia v15.5 (Build 24F74)
Kernel Darwin v24
Arch arm64 (M3)
Shell zsh v5.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions