Python을 설치할 수 없습니다. "신뢰할 수있는 옵션에 대해 설정된 충돌 값"
결과 python ––version
:
Command 'python' not found, but can be installed with:
sudo apt install python3
sudo apt install python
sudo apt install python-minimal
You also have python3 installed, you can run 'python3' instead.
고양이의 결과 /etc/apt/sources.list
:
# deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted
# See http://help.ubuntu.com/community http://packages.ros.org/ros/ubuntu/y/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb [trusted=yes] http://br.archive.ubuntu.com/ubuntu/ bionic restricted main
# deb-src http://br.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://br.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://br.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://br.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://br.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://br.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://br.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://br.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://br.archive.ubuntu.com/ubuntu/ bionic-backports restricted universe multiverse main
# deb-src http://br.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu bionic-security restricted main
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://archive.canonical.com/ bionic partner
# deb-src http://archive.canonical.com/ bionic partner
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://br.archive.ubuntu.com/ubuntu/ bionic-updates main multiverse universe restricted
deb http://my-private-server.test bionic main
# deb-src http://my-private-server.test bionic main
결과 sudo apt update
:
E: Conflicting values set for option Trusted regarding source http://br.archive.ubuntu.com/ubuntu/ bionic
E: The list of sources cannot be read.
결과 /etc/apt/sources.list
:
bash: /etc/apt/sources.list: Permission denied
최신 정보
문제를 해결하려고 시도한 후에도 (@PMF 여기에 수행 한 작업을 추가하십시오) 여전히 작동하지 않습니다. sources.list
현재 5 행 은 다음과 같습니다.
~$ sed -n 5p /etc/apt/sources.list
deb deb [arch=amd64 trusted=yes] http://br.archive.ubuntu.com/ubuntu/ bionic main http://br.archive.ubuntu.com/ubuntu/ bionic restricted main
답변
당신이 [trusted=yes]
이 줄에서 옵션으로 :
deb [trusted=yes] http://br.archive.ubuntu.com/ubuntu/ bionic restricted main
그러나 동일한 URL을 가진 다른 줄은 그렇지 않기 때문에 충돌하는 옵션이 있다고 말합니다.
문제를 해결하려면 URL이 동일한 다른 모든 줄에 해당 옵션을 추가하거나 원하는 편집기를 사용하여 제거하거나 다음을 실행하면됩니다.
sudo sed -i '/bionic restricted main$/s/^deb \[trusted=yes]/deb/' /etc/apt/sources.list
python3이 설치되어 있으며 Python 2.7이 2020 년 1 월 1 일에 수명이 다 했으므로 Python 3.x와 함께 Python 2.x를 설치할 필요가 없습니다. 명령 python3
을 사용 하여 Python3.x 인터프리터를 시작하면 다음 명령 python
이 실행 됩니다. 설치된 경우 Python2.x 인터프리터를 시작하는 데 사용됩니다.
E: Conflicting values set for option Trusted regarding source http://br.archive.ubuntu.com/ubuntu/ bionic
오류 라인 5 를 제거하려면 다음과 같이 라인 시작 부분에 문자를 /etc/apt/sources.list
삽입하여 주석 처리해야 #
합니다.
# deb deb [arch = amd64 trusted = yes] http://br.archive.ubuntu.com/ubuntu/ bionic main limited
pLumo의 코멘트에 따르면 "아니오, 같은 줄입니다. 그가 바꾼 후에." 이 경우 기본적으로 deb http://br.archive.ubuntu.com/ubuntu/ bionic main restricted
두 개가 아닌 주석 처리되지 않은 한 줄이 있어야 합니다. sources.list에 deb http://br.archive.ubuntu.com/ubuntu/ bionic main restricted
Ubuntu가 소프트웨어를 업데이트 할 수 없다는 내용 의 줄이없는 경우 .
혼란스러운 텍스트 서식으로 인해 질문을 읽는 다른 방법에 따르면 sources.list에 이미 다음과 같은 또 다른 줄이 있습니다.
deb http://br.archive.ubuntu.com/ubuntu/ 바이오닉 메인 제한
모호한 텍스트 서식으로 인해주의가 산만 해지지 않도록하십시오. 필요한 결과는 두 경우 모두 동일합니다. sources.list에 위의 줄이 있어야합니다. 이 줄을 주석 처리하지 마십시오!
편집에로의 sources.list 파일 sudo nano /etc/apt/sources.list
의 사용이 필요합니다 sudo
당신이 루트로 권한을 상승해야하므로,이 파일이 루트에 의해 소유되어 있기 때문에이 sudo
나노 텍스트 편집기로 편집을하기 위해.
나노 텍스트 편집기 키보드 바로 가기
키보드 조합 Ctrl+를 사용 O하고 그 후에 Enter파일을 현재 위치에 저장합니다.
키보드 조합 Ctrl+ X를 사용하여 nano를 종료합니다.
후에는 편집이 /etc/apt/sources.list
실행 sudo apt update
가능한 소프트웨어 목록을 새로 고칩니다.