package grub-pc 2.02~beta2-36ubuntu3.10 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2

Bug #1692205 reported by Radim
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

radim@sbasus2011r:~$ sudo apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-pc (2.02~beta2-36ubuntu3.10) ...
/var/lib/dpkg/info/grub-pc.postinst: line 703: syntax error near unexpected token `fi'
dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: grub-pc 2.02~beta2-36ubuntu3.10
ProcVersionSignature: Ubuntu 4.4.0-79.100-generic 4.4.67
Uname: Linux 4.4.0-79-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
Date: Sat May 20 12:28:02 2017
DuplicateSignature:
 package:grub-pc:2.02~beta2-36ubuntu3.10
 Setting up grub-pc (2.02~beta2-36ubuntu3.10) ...
 /var/lib/dpkg/info/grub-pc.postinst: line 703: syntax error near unexpected token `fi'
 dpkg: error processing package grub-pc (--configure):
  subprocess installed post-installation script returned error exit status 2
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationDate: Installed on 2013-11-11 (1285 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-79-generic root=UUID=399d52c1-8d50-4bc4-ac01-60de3767d9b1 ro quiet splash
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.20
SourcePackage: grub2
Title: package grub-pc 2.02~beta2-36ubuntu3.10 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
UpgradeStatus: Upgraded to xenial on 2016-08-14 (278 days ago)

Revision history for this message
Radim (rsv) wrote :
tags: removed: need-duplicate-check
Revision history for this message
AlcaCoop (alcacoop) wrote :

missing semicolon on line 699, this is the fix:

- if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 then
+ if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10; then

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.