- 기술지원설치 오류
-
네오사이버 2025-04-16 19:19:28- hits132
설치 시 다음과 같은 오류가 발생합니다.
Register environment variables.
Variable check completed.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Python packages installation completed.
Update /etc/hosts, .ssh/known_hosts file.
Container Platform vars setting completed.
PLAY [kube_control_plane] ****************************************************************************************************************************************************************************************
TASK [cp-download : Get home dir path] ***************************************************************************************************************************************************************************
changed: [master_node]
TASK [cp-download : Download container platform deployment] ******************************************************************************************************************************************************
ok: [master_node]
PLAY [kube_control_plane] ****************************************************************************************************************************************************************************************
TASK [cp-setting : Get home dir path] ****************************************************************************************************************************************************************************
changed: [master_node]
TASK [cp-setting : Copy vars file] *******************************************************************************************************************************************************************************
ok: [master_node]
TASK [cp-setting : Copy key file] ********************************************************************************************************************************************************************************
ok: [master_node]
TASK [cp-setting : Chmod key file] *******************************************************************************************************************************************************************************
ok: [master_node]
PLAY [kube_control_plane] ****************************************************************************************************************************************************************************************
TASK [cp-install : Get home dir path] ****************************************************************************************************************************************************************************
changed: [master_node]
TASK [cp-install : Deployment shell permissions] *****************************************************************************************************************************************************************
ok: [master_node]
TASK [cp-install : Run container platform deployment] ************************************************************************************************************************************************************
Register environment variables.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Python packages installation completed.
Traceback (most recent call last):
File "/home/ubuntu/cp-deployment/standalone/contrib/inventory_builder/inventory.py", line 40, in <module>
from ruamel.yaml import YAML
ModuleNotFoundError: No module named 'ruamel'
Container Platform vars setting completed.
[WARNING]: Unable to parse /home/ubuntu/cp-
deployment/standalone/inventory/mycluster/hosts.yaml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
[WARNING]: While constructing a mapping from /home/ubuntu/cp-
deployment/standalone/roles/bootstrap-os/tasks/main.yml, line 29, column 7,
found a duplicate dict key (paths). Using last defined value only.
[WARNING]: Skipping callback plugin 'ara_default', unable to load
[WARNING]: Could not match supplied host pattern, ignoring: kube-master
[WARNING]: Could not match supplied host pattern, ignoring: kube-node
[WARNING]: Could not match supplied host pattern, ignoring: k8s-cluster
[WARNING]: Could not match supplied host pattern, ignoring: calico-rr
[WARNING]: Could not match supplied host pattern, ignoring: no-floating
[WARNING]: Could not match supplied host pattern, ignoring: bastion
[WARNING]: Could not match supplied host pattern, ignoring: k8s_cluster
[WARNING]: Could not match supplied host pattern, ignoring: etcd
[WARNING]: Could not match supplied host pattern, ignoring: calico_rr
[WARNING]: Could not match supplied host pattern, ignoring: kube_node
[WARNING]: Could not match supplied host pattern, ignoring: kube_control_plane
[WARNING]: Could not match supplied host pattern, ignoring:
_kubespray_needs_etcd
PLAY [Check Ansible version] ***************************************************
skipping: no hosts matched
PLAY [Add kube-master nodes to kube_control_plane] *****************************
skipping: no hosts matched
PLAY [Add kube-node nodes to kube_node] ****************************************
skipping: no hosts matched
PLAY [Add k8s-cluster nodes to k8s_cluster] ************************************
skipping: no hosts matched
PLAY [Add calico-rr nodes to calico_rr] ****************************************
skipping: no hosts matched
PLAY [Add no-floating nodes to no_floating] ************************************
skipping: no hosts matched
PLAY [Install bastion ssh config] **********************************************
skipping: no hosts matched
PLAY [Bootstrap hosts for Ansible] *********************************************
skipping: no hosts matched
PLAY [Gather facts] ************************************************************
skipping: no hosts matched
PLAY [Prepare for etcd install] ************************************************
skipping: no hosts matched
PLAY [Add worker nodes to the etcd play if needed] *****************************
skipping: no hosts matched
PLAY [Install etcd] ************************************************************
skipping: no hosts matched
PLAY [Install Kubernetes nodes] ************************************************
skipping: no hosts matched
PLAY [Install the control plane] ***********************************************
skipping: no hosts matched
PLAY [Invoke kubeadm and install a CNI] ****************************************
skipping: no hosts matched
PLAY [Install Calico Route Reflector] ******************************************
skipping: no hosts matched
PLAY [Patch Kubernetes for Windows] ********************************************
skipping: no hosts matched
PLAY [Install Kubernetes apps] *************************************************
skipping: no hosts matched
PLAY [Apply resolv.conf changes now that cluster DNS is up] ********************
skipping: no hosts matched
PLAY [kube_control_plane] ******************************************************
skipping: no hosts matched
PLAY [kube_control_plane] ******************************************************
skipping: no hosts matched
PLAY [k8s_cluster] *************************************************************
skipping: no hosts matched
PLAY [k8s_cluster] *************************************************************
skipping: no hosts matched
PLAY [kube_control_plane] ******************************************************
skipping: no hosts matched
PLAY [kube_control_plane[0]] ***************************************************
skipping: no hosts matched
PLAY [kube_control_plane[0]] ***************************************************
skipping: no hosts matched
PLAY [kube_control_plane[0]] ***************************************************
skipping: no hosts matched
PLAY [kube_control_plane[0]] ***************************************************
skipping: no hosts matched
PLAY [k8s_cluster] *************************************************************
skipping: no hosts matched
PLAY RECAP *********************************************************************
Wednesday 16 April 2025 10:11:13 +0000 (0:00:00.038) 0:00:00.038 *******
===============================================================================
changed: [master_node -> localhost]
PLAY [kube_control_plane] ****************************************************************************************************************************************************************************************
TASK [kubeconfig : Get home dir path] ****************************************************************************************************************************************************************************
changed: [master_node]
TASK [kubeconfig : Copy kube config file] ************************************************************************************************************************************************************************
fatal: [master_node]: FAILED! => {"changed": true, "cmd": "cp /home/ubuntu/.kube/config /home/ubuntu/.kube/kubeconfig", "delta": "0:00:00.012961", "end": "2025-04-16 10:11:15.424803", "msg": "non-zero return code", "rc": 1, "start": "2025-04-16 10:11:15.411842", "stderr": "cp: cannot stat '/home/ubuntu/.kube/config': No such file or directory", "stderr_lines": ["cp: cannot stat '/home/ubuntu/.kube/config': No such file or directory"], "stdout": "", "stdout_lines": []}
NO MORE HOSTS LEFT ***********************************************************************************************************************************************************************************************
PLAY RECAP *******************************************************************************************************************************************************************************************************
master_node : ok=10 changed=5 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
안녕하세요. 개방형 클라우드 플랫폼 센터입니다.
공유해주신 로그를 확인한 결과, K-PaaS 설치에 필요한 일부 패키지들이 정상적으로 설치되지 않아 클러스터가 구성되지 않은 것으로 확인되었습니다.
해당 오류는 Ubuntu 23.04 이상 버전부터 적용된 시스템 보호 정책(PEP 668)에 의해 발생하는 것으로, 현재 컨테이너 플랫폼 설치 시 공식적으로 지원되는 운영체제는 Ubuntu 22.04입니다.
설치 환경이 권장 버전인 Ubuntu 22.04를 사용하고 있는지 다시 한 번 확인 부탁드립니다.
또한, 클러스터 설치를 위한 변수 파일(cp-cluster-vars.sh)에 환경 변수 정보가 정확하게 입력되어 있는지 확인해 주시고,
모든 노드(master, worker)에 SSH 키가 올바르게 복사되었는지도 함께 점검해 주시기 바랍니다.
위 사항들을 확인하신 후, 기존 클러스터를 삭제하신 뒤 재설치를 진행해 주시기 바랍니다.
컨테이너 플랫폼 클러스터 설치 가이드
> https://github.com/K-PaaS/container-platform/blob/master/install-guide/standalone/cp-cluster-install-single.md
감사합니다.