Htop immediately closes on Apple Silicon (MacBook Air M1) - homebrew

I installed the Homebrew (non rosetta), then installed the htop. Installation process finished successfully, but htop doesn't work. It just get killed on start.
~ brew config
HOMEBREW_VERSION: 2.7.5-138-g2c83ea7
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2c83ea7339df5ae4d63b0eeb810f638f6d2cc7ca
Last commit: 11 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 677abf931b7846c5ae391cdcaf7e78b5b22286d5
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 12.0 build 1200
Git: 2.30.0 => /opt/homebrew/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 11.0.9.1
macOS: 11.1-arm64
CLT: N/A
Xcode: 12.3
Rosetta 2: false
Trying to run htop:
~: htop
[1] 98691 killed htop
~:
I would appreciate any help.

Related

Nvidia NVML Driver/library version mismatch: dkms, modules, drivers and modinfo versions

I have the Nvidia NVML Driver/library version mismatch error, for which I recommend reading the following answers:
https://stackoverflow.com/a/67105064/1782553
https://stackoverflow.com/a/71672261/1782553
However, after purging and re-installing the nvidia packages (necessary because of the issue described here), I still get the error. A reboot resolved the issue but I'd like to understand why?
Also, I'm not sure I understand the meaning of the 4 following commands and the Nvidia version they display.
Before reboot
$ cat /sys/module/nvidia/version
515.65.01
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 515.65.01 Wed Jul 20 14:00:58 UTC 2022
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
$ dkms status
nvidia, 515.65.07, 5.4.0-131-generic, x86_64: installed
$ modinfo nvidia | grep ^version
version: 515.65.07
After reboot
$ cat /sys/module/nvidia/version
515.65.07
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 515.65.07 Thu Sep 22 00:22:12 UTC 2022
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
$ dkms status
nvidia, 515.65.07, 5.4.0-131-generic, x86_64: installed
$ modinfo nvidia | grep ^version
version: 515.65.07
I understand there's a difference between the loaded driver version and the driver version that will be loaded after next reboot, but I would have guessed that the modinfo version would match the cat /proc/... version, or that the dkms version would match the cat /sys/... version, but they don't…
Could someone make a brief summary of what each command is reading?

New RN project in M1 mbp built failed. "Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable."

System:
OS: macOS 11.3
CPU: (8) arm64 Apple M1
Memory: 124.86 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.0.0 - /opt/homebrew/bin/node
Yarn: Not Found
npm: 7.10.0 - /opt/homebrew/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /Users/chia/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
New RN project create successful, but built failed by Xcode.
Error:
Error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable.
Command PhaseScriptExecution failed with a nonzero exit code
node installed by homebrew, and Intel mbp doesn't have this error.
How to resolve this error?
Node in the PATH
npm -g bin
/opt/homebrew/bin
echo $PATH
/Users/chia/.pyenv/shims:/Users/chia/.rbenv/shims:/Users/chia/.rbenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
sudo ln -s $(which node) /usr/local/bin/node
It resolved.
#pekanchuan 's answer at https://stackoverflow.com/a/67342683/6512858 worked for me.
sudo ln -s $(which node) /usr/local/bin/node
I would like to add though that if this command says /usr/local/bin/node: File exists you need to know that the link already exists to maybe a different version of node.
In my case, to install yarn, brew installed a separate nodejs v15 and linked the file to its binary.
Although I use nvm to have nodejs v14 and nodejs v16. This extra nodejs was the reason for the error mentioned in question.
Simply run sudo rm -f /usr/local/bin/node to remove the link followed by the command sudo ln -s $(which node) /usr/local/bin/node to create correct link.
On my Mac M1 the folder /usr/local/bin was missing so I had the error :
ln: /usr/local/bin/node: No such file or directory
So here is what I did :
cd /usr/local
sudo mkdir bin
sudo ln -s $(which node) /usr/local/bin/node

How To fix Can't update or upgrade Homebrew

How To fix Can't update or upgrade Homebrew
I can no longer run either brew upgrade or brew update: both abort with
Error: homebrew-core is a shallow clone. To `brew update` first run:
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
and if I follow this suggestion and run git ... --unshallow
and if I follow this suggestion and run git ... --unshallow and then try brew update or brew upgrade I still get the same error message.
If I then try the command again (maybe I didn't do it right the first time?) I get
fatal: --unshallow on a complete repository does not make sens`e
How do I get past this error message to run brew upgrade or brew update without errors?
HOMEBREW_VERSION: 2.6.0-82-gde1afcb
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: de1afcbfc58fb3cd5779bd8fbb6b9995700dda4c
Last commit: 30 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a7c63b0f7f7ae416a2f961b263155281759ac3a7
Core tap last commit: 29 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.FwPJPzeLfq/org.macosforge.xquartz:0
HOMEBREW_EDITOR: /usr/local/bin/bbedit
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_EMOJI: set
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit haswell
Clang: 12.0 build 1200
Git: 2.29.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_172
macOS: 10.15.7-x86_64
CLT: 12.0.32.27
Xcode: 12.2
XQuartz: 2.7.11 => /opt/X11
Please Help me i was tired Thanks!
Basically if you see the following error then run what is suggesting you, but could take some time maybe between 5 and 10 minutes depending on how fast is your system:
Error:
homebrew-core is a shallow clone.
homebrew-cask is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
I hope that answered your question to you or someone else, good luck.

troubleshooting to upgrade Homebrew

any suggestion to resolve that trouble?
brew upgrade
==> Upgrading 1 outdated package:
patchelf 0.10 -> 0.11
==> Upgrading patchelf 0.10 -> 0.11
==> Downloading http://timelessname.com/elfbin/helloworld.tar.gz
Already downloaded: /home/felipe/.cache/Homebrew/downloads/e8943dd8577098994c9cc5eb1dc934bb5e93f97834dd65be5ea969e1d144deec--helloworld.tar.gz
==> Downloading https://github.com/NixOS/patchelf/archive/0.11.tar.gz
Already downloaded: /home/felipe/.cache/Homebrew/downloads/bbcd82d38c35bbbe19f8fc9c11c1a6a9294473a0c235cd5d295718d3108dd349--patchelf-0.11.tar.gz
==> ./configure --prefix=/home/linuxbrew/.linuxbrew/Cellar/patchelf/0.11 CXXFLAGS=-static-libgcc -static-libstdc++
Last 15 lines from /home/felipe/.cache/Homebrew/Logs/patchelf/01.configure:
2020-08-29 21:18:19 -0400
./configure
--prefix=/home/linuxbrew/.linuxbrew/Cellar/patchelf/0.11
CXXFLAGS=-static-libgcc -static-libstdc++
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
READ THIS: https://docs.brew.sh/Troubleshooting
These open issues may also help:
patchelf 0.12 https://github.com/Homebrew/linuxbrew-core/pull/21032
i'm trying to upgrade a brew but it's happening something wrong.
can you help me to fix it?
brew config
HOMEBREW_VERSION: 2.4.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: fa39db0192c3641ed18abf93371c31e3a220348f
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core
Core tap HEAD: a394692bb5092789dd8cf49561bf52cf61a1d228
Core tap last commit: 17 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :1
HOMEBREW_MAKE_JOBS: 12
CPU: dodeca-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
Clang: N/A
Git: 2.20.1 => /bin/git
Curl: 7.64.0 => /usr/bin/curl
Kernel: Linux 4.19.0-8-amd64 x86_64 GNU/Linux
OS: Debian GNU/Linux 10 (buster) (buster)
Host glibc: 2.28
/usr/bin/gcc: 8.3.0
glibc: N/A
gcc: N/A
xorg: N/A
brew doctor
brew doctor
Your system is ready to brew.

brew install does not select bottle

I am trying to install MySQL using Homebrew.
➜ ~ brew install mysql
==> Downloading https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.19.tar.gz
Already downloaded: /Users/youri/Library/Caches/Homebrew/mysql-5.7.19.tar.gz
==> cmake . -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.7.19 -DCMAKE_
load: 2.07 cmd: cmake 67907 running 1.22u 1.81s
load: 1.98 cmd: ruby 69196 running 0.03u 0.00s
load: 1.98 cmd: ruby 69218 running 0.01u 0.00s
load: 1.98 cmd: ruby 69236 running 0.02u 0.00s
load: 1.98 cmd: make 69256 running 0.00u 0.00s
load: 1.98 cmd: clang 69273 running 0.04u 0.01s
load: 1.98 cmd: ruby 69291 running 0.00u 0.00s
==> make
Why doesn’t Homebrew select a bottled version of mysql instead of building it from source?
Edit: i am using High Sierra last beta
There can be two reasons why you don’t get a bottle:
You use a custom prefix and the formula doesn’t support it
The formula doesn’t have a bottle for your OS
You fall in the second case: Homebrew doesn’t provide bottles for High Sierra. mysql.rb only has bottles for Sierra, El Capitan, and Yosemite.

Resources