Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac Terminal install failing possibly due to PR 1485 #1536

Closed
girishpandit88 opened this issue Jul 25, 2024 · 4 comments
Closed

Mac Terminal install failing possibly due to PR 1485 #1536

girishpandit88 opened this issue Jul 25, 2024 · 4 comments

Comments

@girishpandit88
Copy link

#1485

This PR asks for scrypted version and the installer barfs on undefined version. Should the version SCRYPTED_INSTALL_VERSION be defined in the install script somewhere?

 curl -s https://raw.githubusercontent.com/koush/scrypted/main/install/local/install-scrypted-dependencies-mac.sh > ~/install-scrypted-dependencies-mac.sh
bash ~/install-scrypted-dependencies-mac.sh
rm ~/install-scrypted-dependencies-mac.sh
Stopping previous Scrypted Service if it is running...
Unload failed: 5: Input/output error
Try running `launchctl bootout` as root for richer errors.
Installing Scrypted dependencies...
Running: xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
Error during previous command. Ignoring.
Running: brew update
==> Updating Homebrew...
Already up-to-date.
Running: brew install node@20
Warning: node@20 20.15.1 is already installed and up-to-date.
To reinstall 20.15.1, run:
  brew reinstall node@20
Running: brew install libvips
Warning: vips 8.15.2_1 is already installed and up-to-date.
To reinstall 8.15.2_1, run:
  brew reinstall vips
Running: brew install cmake
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake or specify the `--cask` flag.
Warning: cmake 3.30.1 is already installed and up-to-date.
To reinstall 3.30.1, run:
  brew reinstall cmake
Running: gobject-introspection libffi pkg-config
/Users/gp/install-scrypted-dependencies-mac.sh: line 28: gobject-introspection: command not found
Error during previous command. Ignoring.
Running: brew install gstreamer
Warning: gstreamer 1.24.5 is already installed and up-to-date.
To reinstall 1.24.5, run:
  brew reinstall gstreamer
Running: brew install [email protected]
Warning: [email protected] 3.10.14_1 is already installed and up-to-date.
To reinstall 3.10.14_1, run:
  brew reinstall [email protected]
Running: python3.10 -m pip install --upgrade pip
Requirement already satisfied: pip in /opt/homebrew/lib/python3.10/site-packages (24.1.2)
Running: python3.10 -m pip install debugpy typing_extensions opencv-python psutil
Requirement already satisfied: debugpy in /opt/homebrew/lib/python3.10/site-packages (1.8.2)
Requirement already satisfied: typing_extensions in /opt/homebrew/lib/python3.10/site-packages (4.12.2)
Requirement already satisfied: opencv-python in /opt/homebrew/lib/python3.10/site-packages (4.10.0.84)
Requirement already satisfied: psutil in /opt/homebrew/lib/python3.10/site-packages (6.0.0)
Requirement already satisfied: numpy>=1.21.2 in /opt/homebrew/lib/python3.10/site-packages (from opencv-python) (2.0.1)
Installing Scrypted Launch Agent...
Running: mkdir -p /Users/gp/Library/LaunchAgents
Installing Scrypted...
Running: /opt/homebrew/opt/node@20/bin/npx -y scrypted@latest install-server
install-server version: undefined
Node version mismatch, missing, or corrupt. Clearing node_modules.
running npm --prefix /Users/gp/.scrypted install --production @scrypted/server@latest
npm warn config production Use `--omit=dev` instead.
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm error code EEXIST
npm error syscall rename
npm error path /Users/gp/.npm/_cacache/tmp/39aeed5d
npm error dest /Users/gp/.npm/_cacache/content-v2/sha512/76/af/aa7a543d6a41e970e97f8145514f15483a4009d70477400bdbe11b158d2f285681630c64dcebbf702589949a49d41791f030b3a06f93be6b72b17d66a93d
npm error errno -13
npm error EACCES: permission denied, rename '/Users/gp/.npm/_cacache/tmp/39aeed5d' -> '/Users/gp/.npm/_cacache/content-v2/sha512/76/af/aa7a543d6a41e970e97f8145514f15483a4009d70477400bdbe11b158d2f285681630c64dcebbf702589949a49d41791f030b3a06f93be6b72b17d66a93d'
npm error File exists: /Users/gp/.npm/_cacache/content-v2/sha512/76/af/aa7a543d6a41e970e97f8145514f15483a4009d70477400bdbe11b158d2f285681630c64dcebbf702589949a49d41791f030b3a06f93be6b72b17d66a93d
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.

npm error A complete log of this run can be found in: /Users/gp/.npm/_logs/2024-07-25T03_13_07_873Z-debug-0.log
/Users/gp/.npm/_npx/0cd4c815eaa50473/node_modules/scrypted/dist/packages/cli/src/service.js:38
        throw new Error(`${command} exited with non zero result ${cp.exitCode}`);
              ^

Error: npm exited with non zero result 243
    at runCommand (/Users/gp/.npm/_npx/0cd4c815eaa50473/node_modules/scrypted/dist/packages/cli/src/service.js:38:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async installServe (/Users/gp/.npm/_npx/0cd4c815eaa50473/node_modules/scrypted/dist/packages/cli/src/service.js:111:9)
    at async main (/Users/gp/.npm/_npx/0cd4c815eaa50473/node_modules/scrypted/dist/packages/cli/src/main.js:123:28)

Node.js v20.15.1
Error during previous command.
@girishpandit88
Copy link
Author

I got around by setting SCRYPTED_INSTALL_VERSION=latest at the top of the mac installer script for those who come looking for same error.

@koush
Copy link
Owner

koush commented Jul 25, 2024

@bjia56 this may be passing an empty string into argv

@koush
Copy link
Owner

koush commented Jul 25, 2024

nevermnd, checked the code undefined is replaced with latest if its not defined.

const installDir = await installServe(process.argv[3] || 'latest');

error also shows this is clearly a user environment issue. probably ran brew with root at some point.

npm error EACCES: permission denied, rename '/Users/gp/.npm/_cacache/tmp/39aeed5d' -> '/Users/gp/.npm/_cacache/content-v2/sha512/76/af/aa7a543d6a41e970e97f8145514f15483a4009d70477400bdbe11b158d2f285681630c64dcebbf702589949a49d41791f030b3a06f93be6b72b17d66a93d'

@koush koush closed this as completed Jul 25, 2024
@gh0sti
Copy link

gh0sti commented Nov 10, 2024

Gonna open this again with the purchase of a new Mac Mini M4, I tried installing from scratch with the terminal command. I get the input/output error 5 issue.

Mac-mini / % curl -s https://raw.githubusercontent.com/koush/scrypted/main/install/local/install-scrypted-dependencies-mac.sh > ~/install-scrypted-dependencies-mac.sh
bash ~/install-scrypted-dependencies-mac.sh
rm ~/install-scrypted-dependencies-mac.sh
Stopping previous Scrypted Service if it is running...
Unload failed: 5: Input/output error
Try running launchctl bootout as root for richer errors.
Installing Scrypted dependencies...
Running: xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
Error during previous command. Ignoring.
server installation successful: /Users/gh0sti/.scrypted
/Users/gh0sti/install-scrypted-dependencies-mac.sh: line 124: /Users/gh0sti/Library/LaunchAgents/app.scrypted.server.plist: Permission denied
Running: launchctl load /Users/gh0sti/Library/LaunchAgents/app.scrypted.server.plist
Load failed: 5: Input/output error
Try running launchctl bootstrap as root for richer errors.

My thought is with macOS 15 there is some new security permissions that are needed to be allowed during this script setup to work properly. I know node won't get prompted to be added to the local network permission in settings app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants