플러터에서 cloud_firestore 추가 했습니다. 빌드 후 앱 실행하니, 오류가 발생합니다.
# Dependencies specify other packages that your package needs in order to work.# To automatically upgrade your package dependencies to the latest versions# consider running `flutter pub upgrade --major-versions`. Alternatively,# dependencies can be manually updated by changing the version numbers below to# the latest version available on pub.dev. To see which dependencies have newer# versions available, run `flutter pub outdated`.dependencies:flutter:sdk:fluttercloud_firestore:^5.6.7
🚨오류 내용
cloud_firestore는 Android NDK(Native Development Kit)가 필수라는 내용입니다.
Your project is configured with Android NDK 26.3.11579264, but the following plugin(s) depend on a different Android NDK version:
- cloud_firestore requires Android NDK 27.0.12077973
- firebase_core requires Android NDK 27.0.12077973
Fix this issue by using the highest Android NDK version (they are backward compatible).
Add the following to C:\dev\workspace_android_test\chapter10\android\app\build.gradle.kts:
android {
ndkVersion = "27.0.12077973"
...
}
🛠️해결책
app\build.gradle.kts 파일에서 ndkVersion = flutter.ndkVersion 주석 처리하고, ndkVersion = "27.0.12077973" 문구를 추가 후에 빌드 진행합니다.
$ docker run node
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
🛠️해결책 1
임시 방법입니다. /var/run/docker.sock파일 권한을 변경하는 방법입니다.
$ sudo chmod 666 /var/run/docker.sock
🛠️해결책 2
docker 그룹을 만들고, docker 명령어를 사용하는 사용자를 docker 그룹에 추가하는 방법입니다.
아래 방법으로 추가하고, 시스템을 재부팅합니다.
$ sudo groupadd docker$ sudo usermod -aG docker $USER# 현재 로그인된 사용자 이름이 추가됩니다.$ newgrp
✅확인 작업 진행, 그룹에 추가되어는지 확인합니다. 사용자ID는 명령어 실행한 사람마다 다릅니다
$ cat /etc/group | grep docker
docker:x:984:사용자ID
✅확인 작업 진행,docker명령어 실행하여 확인합니다.
$ docker search node
NAME DESCRIPTION STARS OFFICIAL
node Node.js is a JavaScript-based platform for s… 13889 [OK]
circleci/node Node.js is a JavaScript-based platform for s… 134
cimg/node The CircleCI Node.js Docker Convenience Imag… 24
bitnami/node Bitnami container image for NodeJS 80
kindest/node https://sigs.k8s.io/kind node image 111
okteto/node 2
chainguard/node Build, ship and run secure software with Cha… 0
corpusops/node https://github.com/corpusops/docker-images/ 0
sitespeedio/node Node base template 3
setupphp/node Docker images to run setup-php GitHub Action 0
alpine/node 5
rootpublic/node 0
treehouses/node 2
joxit/node Slim node docker with some utils for dev 1
vmware/node Node.js base built on top of Photon OS 0
wayofdev/node 0
vulhub/node 0
ubuntu/node Ubuntu-based Node.js image for server-side a… 0
systemsdk/node Docker environment with node 16 for Laravel/… 0
openeuler/node 0
presearch/node Run a search node in Presearch's decentraliz… 25
calico/node Calico's per-host DaemonSet container image.… 33
iron/node Tiny Node image 28
appsvc/node Azure App Service Node.js dockerfiles 15
renovate/node Simple node container 1
여기서 amd64는 64비트용 설치 파일을 의미합니다. 만약 32비트가 필요하다면 win32로 끝나는 파일을 선택하시면 됩니다.
💻 Windows에서 파이썬 설치하기
위 링크를 통해 .exe 파일을 다운로드합니다.
설치 파일을 실행한 후, "Add Python to PATH" 항목을 꼭 체크해주세요.
"Install Now" 또는 "Customize Installation"을 선택해 설치를 진행합니다.
설치가 완료되면, 명령 프롬프트(cmd) 에서 python을 입력해 설치 여부를 확인할 수 있습니다.
🍎 macOS에서 파이썬 설치하기
macOS는 기본적으로 Python 2.x 버전이 설치되어 있으나, 최신 버전을 사용하려면 수동 설치가 필요합니다.
방법 1. 공식 사이트에서 .pkg 파일 다운로드
공식 홈페이지에서 .pkg 확장자를 가진 설치 파일을 받아 설치하면 됩니다.
방법 2. Homebrew 사용 (추천)
터미널에서 아래 명령어를 실행해 설치할 수 있습니다:
brew install python
설치 후 python3, pip3 명령어로 실행 가능합니다.
🐧 리눅스(Linux)에서 파이썬 설치하기
대부분의 리눅스 배포판은 Python이 기본 설치되어 있습니다. 하지만 최신 버전이 필요하다면 다음과 같은 방법으로 설치할 수 있습니다.
APT로 설치 (Ubuntu 기준)
sudo apt update
sudo apt install python3
소스 코드로 설치 (고급 사용자용)
sudo apt install wget build-essential libssl-dev zlib1g-dev
wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz
tar -xf Python-3.12.0.tgz
cd Python-3.12.0
./configure --enable-optimizations
make
sudo make install
🔄 여러 버전의 파이썬을 설치하고 관리하고 싶다면?
pyenv 같은 버전 관리 도구를 사용하면 여러 버전의 파이썬을 동시에 설치하고 손쉽게 전환할 수 있습니다.
설치 예시 (macOS/Linux)
curl https://pyenv.run | bash
pyenv install 3.11.0
pyenv global 3.11.0
Windows에서는 pyenv-win을 사용할 수 있으며, GitHub에서 설치 안내를 참고하시면 됩니다.