“ /etc/grub.d/README:6:语法错误:升级grub软件包时出现”(“”意外“

乌斯曼

我在安装任何程序时都遇到问题。我收到的错误Sub-process /usr/bin/dpkg returned an error code (1)以下是的输出日志apt-get -f install知道我的包裹管理员有什么问题吗?

tahir@tahir-Inspiron-1564:/var/www$ sudo apt-get -f install
[sudo] password for tahir: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
5 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.35-27-generic (2.6.35-27.48) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.35-27-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.35-27-generic /boot/vmlinuz-2.6.35-27-generic
 * dkms: running auto installation service for kernel 2.6.35-27-generic                                                                                                 
 *       bcmwl (5.60.48.36+bdcom)...                                                                                                                             [ OK ] 
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.35-27-generic /boot/vmlinuz-2.6.35-27-generic
run-parts: executing /etc/kernel/postinst.d/nvidia-common 2.6.35-27-generic /boot/vmlinuz-2.6.35-27-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.35-27-generic /boot/vmlinuz-2.6.35-27-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.35-27-generic /boot/vmlinuz-2.6.35-27-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.35-27-generic /boot/vmlinuz-2.6.35-27-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-30-generic
Found initrd image: /boot/initrd.img-2.6.35-30-generic
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
Found linux image: /boot/vmlinuz-2.6.35-27-generic
Found initrd image: /boot/initrd.img-2.6.35-27-generic
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
Found linux image: /boot/vmlinuz-2.6.32-27-generic
Found initrd image: /boot/initrd.img-2.6.32-27-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda2
/etc/grub.d/README: 2: All: not found
/etc/grub.d/README: 4: 00_*:: not found
/etc/grub.d/README: 5: 10_*:: not found
/etc/grub.d/README: 6: Syntax error: "(" unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.35-27-generic.postinst line 1010.
dpkg: error processing linux-image-2.6.35-27-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.35-28-generic (2.6.35-28.50) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.35-28-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.35-28-generic /boot/vmlinuz-2.6.35-28-generic
 * dkms: running auto installation service for kernel 2.6.35-28-generic                                                                                                 
 *       bcmwl (5.60.48.36+bdcom)...                                                                                                                             [ OK ] 
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.35-28-generic /boot/vmlinuz-2.6.35-28-generic
run-parts: executing /etc/kernel/postinst.d/nvidia-common 2.6.35-28-generic /boot/vmlinuz-2.6.35-28-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.35-28-generic /boot/vmlinuz-2.6.35-28-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.35-28-generic /boot/vmlinuz-2.6.35-28-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.35-28-generic /boot/vmlinuz-2.6.35-28-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-30-generic
Found initrd image: /boot/initrd.img-2.6.35-30-generic
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
Found linux image: /boot/vmlinuz-2.6.35-27-generic
Found initrd image: /boot/initrd.img-2.6.35-27-generic
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
Found linux image: /boot/vmlinuz-2.6.32-27-generic
Found initrd image: /boot/initrd.img-2.6.32-27-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda2
/etc/grub.d/README: 2: All: not found
/etc/grub.d/README: 4: 00_*:: not found
/etc/grub.d/README: 5: 10_*:: not found
/etc/grub.d/README: 6: Syntax error: "(" unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.35-28-generic.postinst line 1010.
dpkg: error processing linux-image-2.6.35-28-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.35-30-generic (2.6.35-30.59) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.35-30-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.35-30-generic /boot/vmlinuz-2.6.35-30-generic
 * dkms: running auto installation service for kernel 2.6.35-30-generic                                                                                                 
 *       bcmwl (5.60.48.36+bdcom)...                                                                                                                             [ OK ] 
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.35-30-generic /boot/vmlinuz-2.6.35-30-generic
run-parts: executing /etc/kernel/postinst.d/nvidia-common 2.6.35-30-generic /boot/vmlinuz-2.6.35-30-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.35-30-generic /boot/vmlinuz-2.6.35-30-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.35-30-generic /boot/vmlinuz-2.6.35-30-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.35-30-generic /boot/vmlinuz-2.6.35-30-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-30-generic
Found initrd image: /boot/initrd.img-2.6.35-30-generic
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
Found linux image: /boot/vmlinuz-2.6.35-27-generic
Found initrd image: /boot/initrd.img-2.6.35-27-generic
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
Found linux image: /boot/vmlinuz-2.6.32-27-generic
Found initrd image: /boot/initrd.img-2.6.32-27-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda2
/etc/grub.d/README: 2: All: not found
/etc/grub.d/README: 4: 00_*:: not found
/etc/grub.d/README: 5: 10_*:: not found
/etc/grub.d/README: 6: Syntax error: "(" unexpected
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.35-30-generic.postinst line 1010.
dpkg: error processing linux-image-2.6.35-30-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-2.6.35-30-generic; however:
  Package linux-image-2.6.35-30-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 2.6.35.30.38); however:
  Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--confNo apport report written because MaxReports is reached already
                                                                                                          No apport report written because MaxReports is reached already
igure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-2.6.35-27-generic
 linux-image-2.6.35-28-generic
 linux-image-2.6.35-30-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

**

  • 更新:

**
以下是的输出sudo update-grub

tahir@tahir-Inspiron-1564:~$ sudo update-g
update-gconf-defaults  update-grub2           
update-grub            update-gsfontmap       
tahir@tahir-Inspiron-1564:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-30-generic
Found initrd image: /boot/initrd.img-2.6.35-30-generic
Found linux image: /boot/vmlinuz-2.6.35-28-generic
Found initrd image: /boot/initrd.img-2.6.35-28-generic
Found linux image: /boot/vmlinuz-2.6.35-25-generic
Found initrd image: /boot/initrd.img-2.6.35-25-generic
Found linux image: /boot/vmlinuz-2.6.32-28-generic
Found initrd image: /boot/initrd.img-2.6.32-28-generic
Found linux image: /boot/vmlinuz-2.6.32-27-generic
Found initrd image: /boot/initrd.img-2.6.32-27-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda2
/etc/grub.d/README: 2: All: not found
/etc/grub.d/README: 4: 00_*:: not found
/etc/grub.d/README: 5: 10_*:: not found
/etc/grub.d/README: 6: 20_*:: not found
/etc/grub.d/README: 8: The: not found
/etc/grub.d/README: 9: administrator.: not found
/etc/grub.d/README: 10: 01_otheros,: not found
/etc/grub.d/README: 11: the: not found
/etc/grub.d/README: 11: and: not found

文件/etc/grub.d/README如下所示。不知道为什么自述文件很重要。:-/

All executable files in this directory are processed in shell expansion order.

  00_*: Reserved for 00_header.
  10_*: Native boot entries.
  20_*: Third party apps.

The number namespace in-between is configurable by system installer and/or
administrator.  For example, you can add an entry to boot another OS as
01_otheros, 11_otheros, etc, depending on the position you want it to occupy in
the menu; and then adjust the default setting via /etc/default/grub.

文件:/ etc / default / grub:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

文件:/ usr / share / grub / default / grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
安排

您已经以某种方式赋予了README文件执行权限,并且update-grub脚本正在尝试执行它。因此,错误。

因此,删除执行权

sudo chmod -x /etc/grub.d/README

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

尝试在C#中使用ODBC调用Oracle软件包时出现语法错误

来自分类Dev

在 jenkins 中安装软件包时出现语法错误

来自分类Dev

如何使用pip正确安装软件包而不会出现语法错误?

来自分类Dev

升级到节点6时npm sleep软件包出现问题

来自分类Dev

升级到Ubuntu 20.04时出现“无效的软件包信息”错误

来自分类Dev

在节点 6 上构建 Docusaurus 时出现语法错误:意外令牌)

来自分类Dev

导入软件包时出现意外行为

来自分类Dev

PHP语法错误,使用数组时出现意外的“ [”

来自分类Dev

在创建数组时出现语法错误:“(”意外)

来自分类Dev

从ajax调用函数时出现“语法错误:意外的令牌”

来自分类Dev

运行make时出现问题-语法错误:“(”意外

来自分类Dev

在新软件包中使用Python软件包“ click”时,导致“错误:出现意外的额外参数(sdist bdist_wheel)”

来自分类Dev

安装软件包时出现checkCompilerOptions错误(littler / Docker)

来自分类Dev

软件包安装时出现未知错误

来自分类Dev

尝试导入软件包时出现错误消息

来自分类Dev

在pycharm中安装软件包“袖扣”时出现错误

来自分类Dev

尝试使用dpkg安装软件包时出现错误

来自分类Dev

安装软件包时出现奇怪的依赖错误

来自分类Dev

每次安装时出现软件包错误

来自分类Dev

尝试导入软件包时出现错误消息

来自分类Dev

使用PIP安装python软件包时出现错误

来自分类Dev

尝试安装软件包时出现Setuptools错误

来自分类Dev

Rails意外出现语法错误')'

来自分类Dev

语法错误:[stdin]:6:2:意外的{

来自分类Dev

我尝试使用do-release-upgrade从18.04升级到Ubuntu 20.04,但是在升级两个软件包时出现错误

来自分类Dev

PHP的帮助?解析错误:语法错误,第6行出现意外T_STRING

来自分类Dev

将Debian Stretch升级为破坏程序时出现软件包错误

来自分类Dev

在bash中声明数组时出现错误“语法错误:“(”意外“

来自分类Dev

在bash中声明数组时出现错误“语法错误:“(”意外“

Related 相关文章

  1. 1

    尝试在C#中使用ODBC调用Oracle软件包时出现语法错误

  2. 2

    在 jenkins 中安装软件包时出现语法错误

  3. 3

    如何使用pip正确安装软件包而不会出现语法错误?

  4. 4

    升级到节点6时npm sleep软件包出现问题

  5. 5

    升级到Ubuntu 20.04时出现“无效的软件包信息”错误

  6. 6

    在节点 6 上构建 Docusaurus 时出现语法错误:意外令牌)

  7. 7

    导入软件包时出现意外行为

  8. 8

    PHP语法错误,使用数组时出现意外的“ [”

  9. 9

    在创建数组时出现语法错误:“(”意外)

  10. 10

    从ajax调用函数时出现“语法错误:意外的令牌”

  11. 11

    运行make时出现问题-语法错误:“(”意外

  12. 12

    在新软件包中使用Python软件包“ click”时,导致“错误:出现意外的额外参数(sdist bdist_wheel)”

  13. 13

    安装软件包时出现checkCompilerOptions错误(littler / Docker)

  14. 14

    软件包安装时出现未知错误

  15. 15

    尝试导入软件包时出现错误消息

  16. 16

    在pycharm中安装软件包“袖扣”时出现错误

  17. 17

    尝试使用dpkg安装软件包时出现错误

  18. 18

    安装软件包时出现奇怪的依赖错误

  19. 19

    每次安装时出现软件包错误

  20. 20

    尝试导入软件包时出现错误消息

  21. 21

    使用PIP安装python软件包时出现错误

  22. 22

    尝试安装软件包时出现Setuptools错误

  23. 23

    Rails意外出现语法错误')'

  24. 24

    语法错误:[stdin]:6:2:意外的{

  25. 25

    我尝试使用do-release-upgrade从18.04升级到Ubuntu 20.04,但是在升级两个软件包时出现错误

  26. 26

    PHP的帮助?解析错误:语法错误,第6行出现意外T_STRING

  27. 27

    将Debian Stretch升级为破坏程序时出现软件包错误

  28. 28

    在bash中声明数组时出现错误“语法错误:“(”意外“

  29. 29

    在bash中声明数组时出现错误“语法错误:“(”意外“

热门标签

归档