Results 1 to 5 of 5

Thread: Updating packages using package manager throws syntax error

  1. #1
    Join Date
    Nov 2012
    Beans
    6

    Updating packages using package manager throws syntax error

    Hi,

    I'm not able to update packages as I kept getting this error during update:-

    installArchives() failed: dpkg: error: syntax error in triggers deferred file `/var/lib/dpkg/triggers/Unincorp' at character `'

    Error in function:

    SystemError: E:Sub-process /usr/bin/dpkg returned an error code (2)

    I have tried running these commands successfully but still getting the same error after that:-

    apt-get clean up
    apt-get clean all

    Info:

    Ubuntu 11.10

    Linux ______ 3.0.0-29-generic #46-Ubuntu SMP Tue Dec 4 12:16:46 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

  2. #2
    Join Date
    Apr 2008
    Location
    London
    Beans
    1,873
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Updating packages using package manager throws syntax error

    Ok, try this, as suggested in a previous thread.

    First open Nautilus in root mode using:-

    Code:
    gksudo nautilus
    Then navigate to /var/lib/dpkg/triggers and make a backup of the Unincorp file or copy it somewhere else.

    After you have made a backup of the Unincorp file open the current Unincorp file for editing using:-

    Code:
    gksudo gedit /var/lib/dpkg/triggers/Unincorp
    Then remove everything that is there to make it blank and save the file.

  3. #3
    Join Date
    Nov 2012
    Beans
    6

    [Ubuntu] Re: Updating packages using package manager throws syntax error

    Thanks Sealbhach! That solves my problem.


    For those out there who encounter the same error as mine, try these:-

    1. sudo rm /var/lib/dpkg/triggers/Unincorp
    2. sudo touch /var/lib/dpkg/triggers/Unincorp

    I ran gedit as root to remove the contents of Unincorp but somehow there was 20byte still in that file. Therefore I tried removing the file and recreate an empty file -> voila !!

  4. #4
    Join Date
    Nov 2012
    Beans
    6

    [Solved] Re: Updating packages using package manager throws syntax error

    Set the thread to solved.

  5. #5
    Join Date
    Apr 2008
    Location
    London
    Beans
    1,873
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Updating packages using package manager throws syntax error

    Nice one jinchuriki, thanks for writing down the solution you found and marking the thread SOLVED.

    .

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •