Linux Mint 17.3 Rosa apt-get upgrade error

twelve12 sources.list.d # apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… 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.
Do you want to continue? [Y/n]
Setting up insync (1.3.3.36056-trusty) …
dpkg: error processing package insync (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
insync

Although Insync is installed and appears to be working (initial file sync took several hours but now have the checkmark in the icon), this error occurs every time I perform a general update on the system. This is the line from the sources.list:

deb http://apt.insynchq.com/ubuntu trusty non-free contrib

@Jimmy_Simerly: Please try running the following command and send the error raised in the terminal: head -n -3 /var/lib/dpkg/info/insync.postinst | tail -n +8 | sudo python.

Terminal command comes back to a prompt; no error shown.

jsimerly@twelve12 ~ $ head -n -3 /var/lib/dpkg/info/insync.postinst | tail -n +8 | sudo python
jsimerly@twelve12 ~ $

@Jimmy_Simerly: Could you try purging then re-installing Insync? This won’t affect your Insync setup since the config files are stored in ~/.config/Insync.

Purged and reinstalled. Error remains:

dpkg: error processing package insync (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
insync
[ Rootkit Hunter version 1.4.0 ]

Seemed to have isolated the cause of this problem. As a security precaution, /tmp on my computer is mounted noexec in RAM. I changed this mount and the apt-get with insync script ran with no problems.

I am receiving this issue, and I just tested and validated that /tmp is not mounted with noexec enforced. I tried removing and reinstalling insync 3.0 on the latest version, but I still get the warning message.

Errors were encountered while processing:
insync
E: Sub-process /usr/bin/dpkg returned an error code (1)

I’m seeing the same symptoms today under Ubuntu 18.04:

sudu apt autoremove

Setting up insync (3.1.9.40821-bionic)
Errors were encountered while processing:
 insync
E: Sub-process /usr/bin/dpkg returned an error code (1)

Insync GUI appears okay & seems to work.

Hi @james-h

Can you send us the output of sudo sh -x /var/lib/dpkg/info/insync.postinst?

Thanks

Here it is:

sudo sh -x /var/lib/dpkg/info/insync.postinst

+ set -e
+ which apt-cache
+ apt_cache=/usr/bin/apt-cache
+ which apt-config
+ apt_config=/usr/bin/apt-config
+ which apt-key
+ apt_key=/usr/bin/apt-key
+ /usr/bin/apt-config dump
+ grep ^Dir 
+ cut -f 2 -d "
+ apt_dir=/
+ /usr/bin/apt-config dump
+ grep ^Dir::Etc 
+ cut -f 2 -d "
+ sed s:/*$::
+ apt_etc=etc/apt
+ /usr/bin/apt-config dump
+ grep ^Dir::Etc::sourcelist 
+ cut -f 2 -d "
+ apt_sourcelist=sources.list
+ /usr/bin/apt-config dump
+ grep ^Dir::Etc::sourceparts 
+ cut -f 2 -d "
+ apt_sourceparts=sources.list.d
+ apt_sourcefile=/etc/apt/sources.list
+ apt_sourcesdir=/etc/apt/sources.list.d
+ add_repo
+ insync_list_file=/etc/apt/sources.list.d/insync.list
+ ppa_url=http://apt.insync.io
+ lsb_release -si
+ tr [:upper:] [:lower:]
+ distributor_id=ubuntu
+ lsb_release -sc
+ tr [:upper:] [:lower:]
+ distributor_codename=bionic
+ [ ubuntu = linuxmint ]
+ [ ubuntu = debian -o ubuntu = ubuntu -o ubuntu = neon ]
+ apt_entry=deb http://apt.insync.io/ubuntu bionic non-free contrib
+ grep http://apt.insync.io /etc/apt/sources.list
+ in_apt_sourcefile=
+ :
+ grep -r http://apt.insync.io /etc/apt/sources.list.d
+ in_apt_sourcesdir=/etc/apt/sources.list.d/insync.list:deb http://apt.insync.io/ubuntu bionic non-free contrib
/etc/apt/sources.list.d/insync.list.save:deb http://apt.insync.io/ubuntu bionic non-free contrib
+ [ !  ]
+ [ ! /etc/apt/sources.list.d/insync.list:deb http://apt.insync.io/ubuntu bionic non-free contrib
/etc/apt/sources.list.d/insync.list.save:deb http://apt.insync.io/ubuntu bionic non-free contrib ]
+ update_key
+ /usr/bin/apt-key add -

Hi @Kurt_Ko, would you like any more info from me on this one?

Hi @james-h
Could you try following the steps in the Repositories tab in this link?

I followed the various steps & see the same problem.

Along the way I manually tidied what looked like old entry in etc/apt/sources.list.d/insync.list; same problem seen.

Here’s step-by-step commands plus output:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ACCAF35C

Executing: /tmp/apt-key-gpghome.qoVIVfNjRL/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys ACCAF35C
gpg: keyserver receive failed: Server indicated a failure


sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ACCAF35C

Executing: /tmp/apt-key-gpghome.6r0FhFFZ75/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ACCAF35C
gpg: key A684470CACCAF35C: 1 signature not checked due to a missing key
gpg: key A684470CACCAF35C: "Insynchq Inc <services@insynchq.com>" 1 new signature
gpg: Total number processed: 1
gpg:         new signatures: 1
gpg: invalid key resource URL '/tmp/apt-key-gpghome.6r0FhFFZ75/graphics:darktable.asc.gpg'
gpg: keyblock resource '(null)': General error
gpg: key 7721F63BD38B4796: 2 signatures not checked due to missing keys
gpg: key A684470CACCAF35C: 1 signature not checked due to a missing key
gpg: key 040524A84C70D8B5: 1 signature not checked due to a missing key
gpg: key 76F1A20FF987672F: 1 signature not checked due to a missing key
gpg: key 7FCC7D46ACCC4CF8: 2 signatures not checked due to missing keys
gpg: key A8AA1FAA3F055C03: 2 signatures not checked due to missing keys
gpg: key 040524A84C70D8B5: 1 signature not checked due to a missing key
gpg: key 6D975C4791E7EE5E: 2 signatures not checked due to missing keys
gpg: key 3B4FE6ACC0B21F32: 3 signatures not checked due to missing keys
gpg: key D94AA3F0EFE21092: 3 signatures not checked due to missing keys
gpg: key 871920D1991BC93C: 1 signature not checked due to a missing key
gpg: Total number processed: 22
gpg:       skipped new keys: 22

cat /etc/apt/sources.list.d/insync.list 
deb http://apt.insynchq.com/ubuntu bionic non-free contrib # disabled on upgrade to bionic
deb http://apt.insync.io/ubuntu bionic non-free contrib

[edit /etc/apt/sources.list.d/insync.list]
cat /etc/apt/sources.list.d/insync.list 
# deb http://apt.insynchq.com/ubuntu bionic non-free contrib # disabled on upgrade to bionic
deb http://apt.insync.io/ubuntu bionic non-free contrib

sudo apt update

sudo apt autoremove
Setting up insync (3.1.9.40821-bionic) ...
dpkg: error processing package insync (--configure):
 installed insync package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 insync
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt install insync
Reading package lists... Done
Building dependency tree       
Reading state information... Done
insync is already the newest version (3.1.9.40821-bionic).
0 to upgrade, 0 to newly install, 0 to remove and 11 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up insync (3.1.9.40821-bionic) ...
dpkg: error processing package insync (--configure):
 installed insync package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 insync
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi @Kurt_Ko, would you like some further info from me?

Hi @james-h
Sorry for the late response, can you also try doing sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ACCAF35C instead?

Hi @Kurt_Ko
In my previous update, I mentioned running this:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ACCAF35C

It looks identical to the line you posted. Am I missing something?

Hi @james-h

Sorry, missed that in the log

Could you modify /var/lib/dpkg/info/insync.postinst and change the update_key line:

...

add_repo
update_key

...

to

...

add_repo
update_key || true

...

Then run sudo dpkg --configure insync

Thanks @Kurt_Ko, this fix worked & resolved the error message.

Thinking ahead to the next upgrade operation. Should the amendment remain in script insync.postinst ?

1 Like

Hi @james-h

Glad to hear it fixes it for you! Yes this change will be in our next release, you won’t have to change the script everytime