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

Compilation yields "/bin/sh: line 0: cd: OLDPWD not set" on MacOS #1156

Open
serge-hulne opened this issue Mar 8, 2024 · 2 comments
Open
Labels

Comments

@serge-hulne
Copy link

serge-hulne commented Mar 8, 2024

Description

 make install
rm -rf /tmp/opencv
mkdir /tmp/opencv
cd /tmp/opencv
curl -Lo opencv.zip https://github.com/opencv/opencv/archive/refs/tags/4.8.1.zip
  % 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 92.1M    0 92.1M    0     0   726k      0 --:--:--  0:02:09 --:--:--  836k
unzip -q opencv.zip
replace opencv-4.8.1/.editorconfig? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
curl -Lo opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/refs/tags/4.8.1.zip
  % 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 58.6M    0 58.6M    0     0   582k      0 --:--:--  0:01:43 --:--:--  748k
unzip -q opencv_contrib.zip
replace opencv_contrib-4.8.1/.editorconfig? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
rm opencv.zip opencv_contrib.zip
cd -
/bin/sh: line 0: cd: OLDPWD not set

Environment

MacOS : 14.3.1 (23D60)
Apple silicon M1
brew install opencv
/opt/homebrew/Cellar/opencv/4.9.0_4
go version go1.21.3 darwin/arm64

sh env.sh   
This script is no longer necessary and has been deprecated.
See the Custom Environment section of the README if you need to customize your environment.
@alan890104
Copy link

me too, i encounter the same problem with my m2 air

@deadprogram
Copy link
Member

You should install OpenCV using Homebrew on macOS.

See https://gocv.io/getting-started/macos/

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

No branches or pull requests

3 participants