반응형
Raspberry Pi4, mariadb 설치, mysql command에서 문제를 찾을 수 없습니다.
안녕하세요, 저는 pip3와 휠 패키지를 사용하여 라즈베리 파이에 mariadb를 설치했습니다.저는 파이에 인터넷 접속이 되지 않아서 다른 기계에 의존하여 pip 다운로드를 하고 복사를 해야 했습니다.'pip3 show mariadb' 명령을 실행하면 다음과 같은 메시지가 나타납니다.
Version: 1.0.7
Summary: Python MariaDB extension
Home-page: https://www.github.com/mariadb-corporation/mariadb-connector-python
Author: Georg Richter
Author-email: None
License: LGPL 2.1
Location: /home/pi/.local/lib/python3.7/site-packages
Requires:
Required-by:
이를 통해 정상적으로 설치되었지만 'mysql -u root -p' 명령을 사용하여 실행할 수 없는 것 같습니다.'mysql: command not found' 오류가 발생합니다.PATH를 편집해야 하며, 편집할 경우 응용 프로그램의 경로를 어떻게 찾을 수 있습니까?나는 'mysql'에 대한 전체 파일 검색을 해봤지만, 그것들이 무엇인지 알고 있는 몇 개의 파일만 얻었을 뿐 주 애플리케이션은 아닙니다.
이렇게 mariadb를 설치했습니다.
pi@PTGM2:~/mariadb-deps $ pip3 install mariadb-1.0.7-cp37-cp37m-linux_armv7l.whl -f ./ --no-index --no-deps
Looking in links: ./
Processing ./mariadb-1.0.7-cp37-cp37m-linux_armv7l.whl
Installing collected packages: mariadb
Successfully installed mariadb-1.0.7
다음과 같이 만든 파일에서:
pi@PiMainServer:~ $ pip download mariadb -d '/home/pi/mariadb-deps'
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting mariadb
Downloading https://www.piwheels.org/simple/mariadb/mariadb-1.0.7-cp37-cp37m-l inux_armv7l.whl (235 kB)
|████████████████████████████████| 235 kB 100 kB/s
Saved ./mariadb-deps/mariadb-1.0.7-cp37-cp37m-linux_armv7l.whl
Successfully downloaded mariadb
커넥터를 설치한 지 얼마 되지 않아 mariadb-server deb 파일을 얻었는데 설치하려고 하면 mariadb-server-10.3이 필요하다는 오류가 발생합니다!저는 mariadb-server-10.3을 설치하는 줄 알았습니다.다음과 같은 정보를 얻을 수 있습니다.
pi@PTGM2:/var/cache/apt/archives $ sudo dpkg -i mariadb-server_1%3a10.3.29-0+deb10u1_all.deb
(Reading database ... 160964 files and directories currently installed.)
Preparing to unpack mariadb-server_1%3a10.3.29-0+deb10u1_all.deb ...
Unpacking mariadb-server (1:10.3.29-0+deb10u1) over (1:10.3.29-0+deb10u1) ...
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.3 (>= 1:10.3.29-0+deb10u1); however:
Package mariadb-server-10.3 is not installed.
dpkg: error processing package mariadb-server (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server
이제 mysql-common, mariadb-common 및 커넥터를 설치했지만 여전히 오류가 발생합니다.
pi@PTGM2:/var/cache/apt/archives $ sudo dpkg -i mariadb-common_1%3a10.3.29-0+deb 10u1_all.deb
Selecting previously unselected package mariadb-common.
(Reading database ... 160988 files and directories currently installed.)
Preparing to unpack mariadb-common_1%3a10.3.29-0+deb10u1_all.deb ...
Unpacking mariadb-common (1:10.3.29-0+deb10u1) ...
Setting up mariadb-common (1:10.3.29-0+deb10u1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf ( my.cnf) in auto mode
pi@PTGM2:/var/cache/apt/archives $ sudo dpkg -i libmariadb3_1%3a10.3.29-0+deb10u 1_armhf.deb
(Reading database ... 160993 files and directories currently installed.)
Preparing to unpack libmariadb3_1%3a10.3.29-0+deb10u1_armhf.deb ...
Unpacking libmariadb3:armhf (1:10.3.29-0+deb10u1) over (1:10.3.29-0+deb10u1) ...
Setting up libmariadb3:armhf (1:10.3.29-0+deb10u1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
pi@PTGM2:/var/cache/apt/archives $ sudo dpkg -i mariadb-server_1%3a10.3.29-0+deb 10u1_all.deb
(Reading database ... 160993 files and directories currently installed.)
Preparing to unpack mariadb-server_1%3a10.3.29-0+deb10u1_all.deb ...
Unpacking mariadb-server (1:10.3.29-0+deb10u1) over (1:10.3.29-0+deb10u1) ...
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.3 (>= 1:10.3.29-0+deb10u1); however :
Package mariadb-server-10.3 is not installed.
dpkg: error processing package mariadb-server (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server
언급URL : https://stackoverflow.com/questions/68948279/raspberry-pi4-mariadb-install-mysql-comand-not-found-problem
반응형
'programing' 카테고리의 다른 글
C의 char to int 변환 (0) | 2023.08.10 |
---|---|
프래그먼트로 데이터 바인딩을 사용하는 방법 (0) | 2023.08.10 |
babel-polyfill 라이브러리는 어떻게 설치합니까? (0) | 2023.08.10 |
PowerShell에서 사용자 지정 기능 로드 (0) | 2023.08.10 |
도커 파일에서 PYONUNBUFFERED의 용도는 무엇입니까? (0) | 2023.08.05 |