0

I have been getting this error when I try to run synaptic or package installer.

E: The package net.downloadhelper.coapp:i386 needs to be reinstalled, but I can't find an archive for it. E: Internal error opening cache (1). Please report.

I'm running Ubuntu 20.04.6 LTS

Any ides on how to fix it? Thank you in advance.

  • 1
  • @user535733 That is https://www.downloadhelper.net/w/CoApp-Installation . I used to use it before I switched to yt-dlp – Daniel T Feb 29 '24 at 18:06
  • Hi - please remember to include the version of Ubuntu that you are using in your question (in the body/as a tag). – johnandmegh Feb 29 '24 at 19:58
  • Hi I got the package here https://www.downloadhelper.net/w/CoApp-Installation. – Gord1812 Feb 29 '24 at 21:02
  • Daniel T I tried deleting the package using the link you supplied. I got the following message. /var/lib/dpkg/info/net.downloadhelper.coapp.prerm: line 5: /opt/vdhcoapp/vdhcoapp: No such file or directory -bash: /opt/vdhcoapp/vdhcoapp: No such file or directory dpkg: error processing package net.downloadhelper.coapp:i386 (--remove): installed net.downloadhelper.coapp:i386 package pre-removal script subprocess returned error exit status 127 – Gord1812 Feb 29 '24 at 21:07
  • /var/lib/dpkg/info/net.downloadhelper.coapp.postinst: line 10: /opt/vdhcoapp/vdhcoapp: No such file or directory -bash: /opt/vdhcoapp/vdhcoapp: No such file or directory dpkg: error while cleaning up: installed net.downloadhelper.coapp:i386 package post-installation script subprocess returned error exit status 127 Errors were encountered while processing: net.downloadhelper.coapp:i386 – Gord1812 Feb 29 '24 at 21:09
  • 1
    Try https://askubuntu.com/q/438345/1004020 – Daniel T Feb 29 '24 at 21:19
  • 1

2 Answers2

1

The error message says file not found. Since you are trying to delete the package, it doesn't matter what that file is so just create a blank file to satisfy the uninstall script so that it will run without errors:

sudo mkdir  /opt/vdhcoapp/
sudo touch /opt/vdhcoapp/vdhcoap

Now you can remove the package:

sudo dpkg --remove --force-remove-reinstreq net.downloadhelper.coapp:i386 

If you get file not found for other files, then create those files too using the touch command or just run the following command to create all the needed files:

for i in LICENSE.txt README.md ffmpeg ffprobe filepicker vdhcoapp xdg-open; do sudo touch /opt/vdhcoapp/$i; done

and then remove the package:

sudo dpkg --remove --force-remove-reinstreq net.downloadhelper.coapp:i386 

To explain the last command, this is a "for loop" that runs the command sudo touch /opt/vdhcoapp/$i where $i is each variable listed after "for i in" — the loop runs the touch command for each one.

So it basically runs the following commands one by one until none are left:

sudo touch /opt/vdhcoapp/LICENSE.txt
sudo touch /opt/vdhcoapp/README.md
sudo touch /opt/vdhcoapp/ffmpeg
sudo touch /opt/vdhcoapp/ffprobe
sudo touch /opt/vdhcoapp/filepicker
sudo touch /opt/vdhcoapp/vdhcoapp
sudo touch /opt/vdhcoapp/xdg-open
mchid
  • 43,546
  • 8
  • 97
  • 150
  • Thanks for the help mchild. When I run the purge I get the following $ sudo apt purge net.downloadhelper.coapp:i386 Reading package lists... Done Building dependency tree
    Reading state information... Done E: The package net.downloadhelper.coapp:i386 needs to be reinstalled, but I can't find an archive for it.
    – Gord1812 Mar 02 '24 at 20:43
  • @Gord1812 My bad. You said in an earlier comment "I tried deleting the package using the link you supplied. I got the following message." and then posted an error message. If that wasn't an error message for purging the package, then do whatever you did then instead. – mchid Mar 02 '24 at 21:24
  • @Gord1812 Did you use sudo dpkg --remove --force-remove-reinstreq <packagename>? If so, then I will edit my answer and use that instead. If not, then will you please tell me which one you use? Thanks. – mchid Mar 02 '24 at 21:28
  • @Gord1812 In any case, the command you used to produce the error /var/lib/dpkg/info/net.downloadhelper.coapp.prerm: line 5: /opt/vdhcoapp/vdhcoapp: No such file or directory -bash: /opt/vdhcoapp/vdhcoapp: No such file or directory dpkg: error processing package net.downloadhelper.coapp:i386 (--remove): installed net.downloadhelper.coapp:i386 package pre-removal script subprocess returned error exit status 127 is the one you should use now because this error message says that it cannot remove files that do not exist. The touch commands in my answer will create dummy files to satisfy this req – mchid Mar 02 '24 at 21:31
  • @Gord1812 uirement – mchid Mar 02 '24 at 21:31
  • mchild I used sudo dpkg --remove --force-remove-reinstreq net.downloadhelper.coapp:i386 [sudo] password for gord: dpkg: warning: overriding problem because --force enabled: dpkg: warning: package is in a very bad inconsistent state; you should reinstall it before attempting a removal dpkg: warning: files list file for package 'net.downloadhelper.coapp:i386' missing; assuming package has no files currently installed (Reading database ... 224097 files and directories currently installed.) Removing net.downloadhelper.coapp:i386 (2.0.17) ... – Gord1812 Mar 02 '24 at 22:49
  • 1
    mchild After running the above and rebooting I can now run synaptic. Thank you very much for your help. Cheers – Gord1812 Mar 02 '24 at 22:53
  • @Gord1812 Okay cool, I'll update the answer. Thanks. – mchid Mar 03 '24 at 23:15
0

Had the same problem. I fixed mine using the following commands:

sudo rm -rf /opt/vdhcoapp/
sudo rm -i /var/lib/dpkg/info/net.downloadhelper.coapp.*

I could then reinstall it properly and/or remove it without an issue.