Терминал не работает. Дополнительный мусор в конце файла

так что я не совсем уверен, что я делал, видя, как это было несколько месяцев назад. Я действительно не помню!

Но эта проблема не позволяет мне делать что-либо в терминале, которое имеет отношение к sudo, apt или чему-либо другому, и проблема всегда возникает так,

E: Syntax error /etc/apt/apt.conf.d/99ignoreresave:2: Extra junk at end of file
E: Syntax error /etc/apt/apt.conf.d/99mysettings:3: Extra junk at end of file

Я действительно хочу сделать что-то еще, так что кто-то может помочь мне исправить это Я пытался переписать файл с помощью nano, но это не исправлено. Я сделал то, что говорит интернет, но ничего не работает.

0
задан 20 June 2020 в 06:49

1 ответ

Looks like you've created a bunch of extra files (with errors) in apt.conf.d. You should get rid of these files.

Enter Recovery Mode

  1. Reboot your computer and quickly press and hold the Shift key to enter the Grub menu.

  2. Select "(recovery mode)".

  3. In the next menu, select "Drop to root shell prompt".

  4. In the terminal, mount your file system as read/write:

     mount -o remount,rw /
     mount --all
    

Make a temporary directory:

mkdir /home/Temp

Move the erroneous files:

mv /etc/apt/apt.conf.d/99ignoreresave /home/Temp
mv /etc/apt/apt.conf.d/99mysettings /home/Temp

If there are other files you manually created, move them also.

Then, reboot.

(If you don't need your custom files, you can remove them all using sudo rm -rf /home/Temp, or you can move them somewhere else to review them).

1
ответ дан 30 July 2020 в 22:25

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

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