Синтаксическая ошибка /etc/apt/apt.conf.d/listchanges.conf :7 :Лишний мусор в конце файла

@ctrl -alt -Делор предложил vlc для чтения файлов, которыми манипулируют. если я соединю это со звукозаписывающим устройством gnome --, у меня должно быть быстрое решение.

однако, это не верно для kali. много ошибок очень быстро. @RomeoNinov, @ctrl -alt -delor и @K7AAY указали, что kali — не тот дистрибутив, и они правы.

Я попробую это решение с Debian

финальное обновление:воспроизведение аудиофайлов с помощью звукозаписывающего устройства или gnome -звукозаписывающее устройство -приводит к сбоям в 100% случаев при тестировании Debian. решение:не открывать аудиофайлы с помощью диктофона. открой vlc и все будет ок.

примечания:

  • я использовал тестирование Debian и преуспел
  • kali столкнулся с теми же проблемами, поэтому, вероятно, у него есть те же решения.
  • Вероятно, не имеет значения, какой у вас дистрибутив, если вы можете получить vlc и аудиорекордер
3
06.10.2020, 16:44
1 ответ

Я смог воспроизвести вашу проблему, используя ваш файл конфигурации.

man apt-listchangesпоказывает:

CONFIGURATION FILE
       apt-listchanges reads its configuration from the /etc/apt/listchanges.conf. The
       file consists of sections with names enclosed in the square brackets. Each section
       should contain lines in the key=value format. Lines starting with the "#" sign are
       treated as comments and ignored.

       Section is a name of profile that can be used as parameter of the --profile
       option.

       The configuration of the "apt" section can be managed by debconf(7), and most of
       the settings there can be changed with the help of the dpkg-reconfigure
       apt-listchanges command.

       Key is a name of some command-line option (except for --apt, --profile, --help)
       with the initial hyphens removed, and the remaining hyphens translated to
       underscores, for example: "email_format" or "save_seen".

       Value represents the value of the corresponding option. For command-line options
       that do not take argument, like "confirm" or "headers", the value should be set
       either to "1", "yes", "true", and "on" in order to enable the option, or to "0",
       "no", "false", and "off" to disable it.

       Additionally key can be one of the following keywords: "browser", "pager" or
       "xterm". The value of such configuration entry should be the name of an
       appropriate command, eventually followed by its arguments, for example:
       "pager=less -R".

       Example 1. Example configuration file

           [cmdline]
           frontend=pager

           [apt]
           frontend=xterm-pager
           email_address=root
           confirm=1

           [custom]
           frontend=browser
           browser=mozilla

       The above configuration file specifies that in command-line mode, the default
       frontend should be "pager". In apt mode, the xterm-pager frontend is default, a
       copy of the changelogs (if any) should be emailed to root, and apt-listchanges
       should ask for confirmation. If apt-listchanges is invoked with --profile=custom,
       the browser frontend will be used, and invoke mozilla.

Главное, нужно переместить /etc/apt/apt.conf.d/listchanges.confв /etc/apt/listchanges.conf. Тогда все должно работать.

Если вам интересно, почему эта ошибка сломала apt, пакетapt-listchanges(3.22 )развертывается /etc/apt/apt.conf.d/20listchangesсо следующим содержимым:

$ cat 20listchanges 
DPkg::Pre-Install-Pkgs { "/usr/bin/apt-listchanges --apt || test $? -lt 10"; };
DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";
DPkg::Tools::Options::/usr/bin/apt-listchanges::InfoFD "20";

Вы видите, что это не формат INI, в котором находится ваш файл. man apt.confописывает формат файла -, необходимый для apt.conf. Необработанный перевод вашего контента даст что-то вроде этого:

Apt {
  frontend pager;
  email_address "root";
  confirm 0;
  save_seen /var/lib/apt/listchanges.db;
  which both;
};

Если я изменю ваш файл в этот формат, apt снова заработает. Это потому, что формат файла -соблюдается. Вероятно, этот файл ничего не делает (, потому что apt.conf не читает эти ключи ),но, по крайней мере, так вы бы написали файл apt.conf.

4
18.03.2021, 22:59

Теги

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