Не мог разрешить archive.canonical..com

Я плохо знаком с человечностью и пытаюсь сделать установку программного обеспечения. Я получаю эту ошибку:

Could not resolve 'archive.canonical..com'

Я заметил, что существует дополнительное . там. Существует ли способ зафиксировать это?

0
задан 11 June 2016 в 00:00

2 ответа

For this open a terminal (ctrl+alt+t) and edit the /etc/apt/sources.list file by:

sudo nano /etc/apt/sources.list

There are actually two lines with canonical in it, check them for the double . and remove one. Then press ctrl+x to stop editing, press y to save and confirm the filename with a press on return.

2
ответ дан 23 December 2019 в 17:21

This sed one liner should fix it:

sed -ri.bak 's/(archive\.canonical\.)\.(com)/\1\2/' /etc/apt/sources.list

Assuming the repositories are defined in the /etc/apt/sources.list file.

To run it over the .list files in /etc/apt/sources.list.d directories too:

sed -ri.bak 's/(archive\.canonical\.)\.(com)/\1\2/' /etc/apt/sources.list /etc/apt/sources.list.d/*.list

The original file will be kept with a .bak extension.

If you do not want to keep a backup:

sed -ri 's/(archive\.canonical\.)\.(com)/\1\2/' /etc/apt/sources.list
1
ответ дан 23 December 2019 в 17:21

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

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