Я плохо знаком с человечностью и пытаюсь сделать установку программного обеспечения. Я получаю эту ошибку:
Could not resolve 'archive.canonical..com'
Я заметил, что существует дополнительное .
там. Существует ли способ зафиксировать это?
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.
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