Я не могу установить Python - «Конфликтующие значения, установленные для параметра Trusted»

Результаты python –– версия :

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.

Результаты of cat /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, пожалуйста, добавьте сюда, что вы сделали) , это все еще не работает. Строка 5 sources.list теперь гласит:

~$ 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
1
задан 21 August 2020 в 13:22

2 ответа

У вас есть [доверенный = 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
0
ответ дан 24 August 2020 в 08:20

You have python3 installed, and it's not necessary to install Python 2.x alongside Python 3.x because Python 2.7 reached the end of its life on January 1st, 2020. Use the command python3 to start the Python3.x interpreter, and the command python is used to start the Python2.x interpreter if it is installed.

To remove the E: Conflicting values set for option Trusted regarding source http://br.archive.ubuntu.com/ubuntu/ bionic error line 5 of /etc/apt/sources.list should be commented out by inserting a # character at the beginning of the line as follows:

# deb deb [arch=amd64 trusted=yes] http://br.archive.ubuntu.com/ubuntu/ bionic main restricted

According to pLumo's comment "No, it is the same line. After he changed it." If this is the case then you basically need to have one line that isn't commented out that says deb http://br.archive.ubuntu.com/ubuntu/ bionic main restricted not two of them. If you don't have a line in sources.list that says deb http://br.archive.ubuntu.com/ubuntu/ bionic main restricted Ubuntu will be unable to update the software.

According to another way of reading your question because of confusing text formatting you already have another line in sources.list that says:

deb http://br.archive.ubuntu.com/ubuntu/ bionic main restricted

Try not to be distracted by ambiguous text formatting. The required result is the same in either of the two cases. You need to have the above line in sources.list. Don't comment this line out!

To edit the sources.list file with sudo nano /etc/apt/sources.list requires the use of sudo because this file is owned by root, so you must elevate your privileges to root with sudo in order to edit it with nano text editor.

Nano text editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.

After editing /etc/apt/sources.list run sudo apt update to refresh the list of available software.

0
ответ дан 24 August 2020 в 08:20

Другие вопросы по тегам:

Похожие вопросы: