Recent Posts
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- JanusGateway
- JanusWebRTCServer
- 헥사고날아키텍처 #육각형아키텍처 #유스케이스
- 자원부족
- 겨울 부산
- 오블완
- VARCHAR (1)
- 깡돼후
- 달인막창
- Value too long for column
- vfr video
- 코루틴 빌더
- JanusWebRTC
- python
- Spring Batch
- JanusWebRTCGateway
- 티스토리챌린지
- 코루틴 컨텍스트
- mp4fpsmod
- kotlin
- 개성국밥
- terminal
- taint
- pytest
- k8s #kubernetes #쿠버네티스
- table not found
- PytestPluginManager
- PersistenceContext
- preemption #
- tolerated
Archives
너와 나의 스토리
[M1] Homebrew 실행 안 될 때 / yarn 실행 안 되는 문제 해결 / python2 설치 본문
반응형
Homebrew 실행 문제
- {$ brew config}해서 HOMEBREW_PREFIX 확인
원인
- prefix 문제: /usr/local 이면 안 됨 -> /opt/homebrew여야 함
해결책
- m1 Homebrew 다시 설치한 다음 다음의 명령어 실행
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- brew doctor 실행
- $ /opt/homebrew/bin/brew doctor
- 여기에 나오는대로 prefix 변경
- $ echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
Yarn 실행 문제
문제
- yarn이 제대로 실행되지 않음. 아래의 에러 발생
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error
해결책 1
brew upgrade icu4c
brew upgrade
brew cleanup
- 결과: 위 작업해도 동일한 문제 발생
해결책 2
- npm 버전 확인해보니 npm이 제대로 설치되어있지 않았음(마이그레이션할 때 문제가 있었던 모양)
- -> npm 설치하니 문제해결 (upgrade or install)
- 참고: https://stackoverflow.com/questions/53828891/dyld-library-not-loaded-usr-local-opt-icu4c-lib-libicui18n-62-dylib-error-run
+ Yarn 실행 문제
- 다음날 다시 실행해보니 다른 문제 발생
- 에러:
gyp verb check python checking for Python executable "python2" in the PATH
Can't find Python executable "python", you can set the PYTHON env variable.
- python 2가 없어서 생기는 문제 같다.
해결책 1
- https://dev.to/jordicuevas/how-to-install-python2-in-a-macbook-m1-with-brew-bhi
- pyenv로 python 2 설치할 때 다음과 같은 에러 발생
Last 10 log lines:
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
dyld[15770]: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python
Referenced from: /private/var/folders/2n/h7k861yx7q5b73vmch9tls080000gr/T/python-build.20230228001342.7329/Python-2.7.18/python.exe
Reason: tried: '/System/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/2.7/Python' (no such file)
/bin/sh: line 1: 15770 Abort trap: 6 DYLD_LIBRARY_PATH=/var/folders/2n/h7k861yx7q5b73vmch9tls080000gr/T/python-build.20230228001342.7329/Python-2.7.18 ./python.exe -E -S -m sysconfig --generate-posix-vars
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1
해결책 2
- python2를 공식 다운로드 페이지에서 설치
- 설치 링크:
- 설치 후 yarn 실행하니 이번에는 이런 에러가 발생
Undefined variable standalone_static_library in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/seojeongyu/IdeaProjects/kakao/devicefarm-wfe/node_modules/node-sass/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (node:events:512:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/opt/homebrew/Cellar/node/19.6.1/bin/node" "/Users/seojeongyu/IdeaProjects/kakao/devicefarm-wfe/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/seojeongyu/IdeaProjects/kakao/devicefarm-wfe/node_modules/node-sass
gyp ERR! node -v v19.6.1
- 위 에러는 binding.gyp 파일에서 standalone_static_library 변수가 정의되어 있지 않아서 발생하는 거라고 함.
그래서 node-gyp 설치node-gyp: Node.js addon을 빌드하기 위한 도구$ npm install -g node-gyp소용없음
- npm upgrade
- "ERESOLVE could not resolve" 에러 발생
- REACT_SPRING 설치 이슈 해결
- $ npm install --force
- $ npm audit fix --force
- node 버전 확인
- $ node -v
- node 버전 변경 방법: https://hororolol.tistory.com/612
- 다시 yarn 실행하니 성공!
- 결론:
- 원인 1: python2가 없어서
- 원인 2: npm 설정이 꼬여서
- 위 두 부분을 수정하니 yarn install 성공
yarn 패키지 의존성 문제
- yarn install까지는 성공했는데 yarn start하니까 아래의 에러 발생
Cannot find module 'react-dev-utils/WatchMissingNodeModulesPlugin'
- 해결책
- node_modules 폴더 삭제 후 재설치
- $ rm -rf node_modules
- $ npm install
- yarn.lock 파일 삭제 후 재설치
- $ rm yarn.lock
- $ yarn install
- 모듈 업데이트
- $ yarn upgrade
- 패키지 의존성 확인
- yarn add <package-name>
- 패키지 다시 clone..
- 패키지 다시 clone해오기
- 다시 yarn install을 하니 이번에는 아래의 에러가 발생한다.
- node_modules 폴더 삭제 후 재설치
error /Users/seojeongyu/IdeaProjects/kakao/devicefarm-wfe/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/seojeongyu/IdeaProjects/kakao/devicefarm-wfe/node_modules/node-sass
Output:
Building: /opt/homebrew/Cellar/node/19.6.1/bin/node /Users/seojeongyu/IdeaProjects/kakao/devicefarm-wfe/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/opt/homebrew/Cellar/node/19.6.1/bin/node',
gyp verb cli '/Users/seojeongyu/IdeaProjects/kakao/devicefarm-wfe/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
...
- node-sass를 설치
- $ yarn add node-sass
- 다시 yarn install & start하니 드디어 성공!!
반응형
'기타' 카테고리의 다른 글
겨울 부산 여행 2박 3일 광안리•해운대 여행 코스 / 식당, 카페 / 경비 (0) | 2022.12.26 |
---|---|
티스토리 특정 카테고리가 "존재하지 않는 페이지"로 뜬다면 (0) | 2022.06.01 |
[춘천] 우성 닭갈비 본점 - 만족스러운 맛집 bb (1) | 2022.02.07 |
[Chrome] 구글 닥스에서 자음 모음 분리 현상 해결하기 (4) | 2022.01.18 |
롯데몰 수지점 카페 베질루르(Basilur) (3) | 2021.11.20 |
Comments