brew install --cask, cursor ., grep: /proc/version: No such file or directory
I used home brew to install cursor on mac, but failed to execute cursor .. It shows the following error:
grep: /proc/version: No such file or directory
/opt/homebrew/bin/cursor: line 62: /Applications/Cursor.app/Contents/Resources/app/bin/../cursor: No such file or directory
Reproduce
$ brew install --cask cursor
$ cursor .
Solution
After I manually edit line 62 in Applications/Cursor.app/Contents/Resources/app/bin/../cursor and remove .., it then works. But the cursor sh is somehow automatically removed in Applications/Cursor.app/Contents/Resources/app/bin/ folder.
Instead, the cursor cmd is now linked to /usr/local/bin/cursor
Environments
Chips version: Apple M2 Max mac os: 14.4.1 (23E224)
I have the same issue.
@yinchuandong wdym edit line 62? hard code the path - then I just have an infinite loop of the program calling itself? ... I cannot get the dirty fix to work.
/usr/local/bin/cursor <path>
works as I would expect cursor <path> to work
EDIT:
I replaced the whole script at Applications/Cursor.app/Contents/Resources/app/bin/cursor with this:
#!/usr/bin/env sh
# Use the correct path for Cursor
CURSOR_PATH="/usr/local/bin/cursor"
# Check if Cursor exists at the specified path
if [ ! -f "$CURSOR_PATH" ]; then
echo "Error: Cursor executable not found at $CURSOR_PATH" >&2
exit 1
fi
# Execute Cursor with all passed arguments
exec "$CURSOR_PATH" "$@"
I got an email of a fix someone posted here, but they deleted it. Here it is:
rm /opt/homebrew/bin/cursor
ln -s /Applications/Cursor.app/Contents/Resources/app/cursor /opt/homebrew/bin/cursor
Since the Cursor dev team don't handle brew issues, we should fix it or report it here: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/c/cursor.rb
I made an PR to homebrew-cask with the fix, someone introduced the bug 5 days ago.
https://github.com/Homebrew/homebrew-cask/pull/183762
I think this can be closed, thanks to @Aubermean