Type '$sudo' is not known on line 2 in source list /etc/apt/sources.list/mono-official-stable.list

Asked by Ivan Bulko

E: The list of sources could not be read
ubuntu 16.04 lts
Неудачно обновился(пк выключился во время обновления)
когда пытался что-то починить полностью удалил все содержимое файла mono-official-stable.list
Ошибка была до того как файли удалились
Как решить проблему?

Question information

Language:
Russian Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Sergios (linuxmangr) said :
#1

Привет.
Попробуй команды по очереди :
1) sudo apt-get -f install
2) sudo apt-get clean && cd /var/lib/apt && sudo mv lists lists.old && sudo mkdir -p lists/partial && sudo apt-get clean && sudo apt-get update

И в зависимости повтори их.

Revision history for this message
Ivan Bulko (pess1rko) said :
#2

"1) sudo apt-get -f install"
вот такая ошибка при использовании команды "apt"(не зависимо от того "apt-get instal"l или "apt-get update" вообщем при любом использовании "apt")
E: Невідомий тип '$sudo' на рядку 2 в переліку джерел /etc/apt/sources.list.d/mono-official-stable.list
E: Неможливо прочитати перелік вихідних кодів.
E: Невідомий тип '$sudo' на рядку 2 в переліку джерел /etc/apt/sources.list.d/mono-official-stable.list
E: Неможливо прочитати перелік вихідних кодів.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

What is the output of the commands

uname -a
lsb_release -crid
cat -n /etc/apt/sources.list.d/mono-official-stable.list

Remark: "apt" and "apt-get" do similar things, they can be interchanged.

Revision history for this message
Ivan Bulko (pess1rko) said :
#5

ivan@IvanASUS:~$ uname -a
Linux IvanASUS 4.8.0-49-generic #52~16.04.1-Ubuntu SMP Thu Apr 20 10:55:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
ivan@IvanASUS:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
ivan@IvanASUS:~$ cat -n /etc/apt/sources.list.d/mono-official-stable.list
     1
     2 $sudo apt update
ivan@IvanASUS:~$

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#6

Issue the command

echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

Revision history for this message
Ivan Bulko (pess1rko) said :
#7

[image: завантаження.jpg]

чт, 21 лют. 2019 о 12:17 Manfred Hampl <email address hidden>
пише:

> Your question #678688 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/678688
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Issue the command
>
> echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial
> main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/678688/+confirm?answer_id=5
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/678688
>
> You received this question notification because you asked the question.
>

Revision history for this message
Ivan Bulko (pess1rko) said :
#8

Thanks Manfred Hampl, that solved my question.