Error in Install.packages : Error Reading From Connection
It's not uncommon to run into an upshot of cleaved packages in Ubuntu and other Debian-based distributions. Sometimes, when yous upgrade the arrangement or install a software package, you may encounter the 'Sub-process /usr/bin/dpkg returned an error code' error.
For instance, a while dorsum, I tried to upgrade Ubuntu 18.04 and I bumped into the dpkg fault equally shown below.
Errors were encountered while processing: google-chrome-stable E: Sub-process /usr/bin/dpkg returned an error code (i)
This indicates that the google-chrome-stable package is either broken or corrupt. There are a few workarounds to this trouble, and so don't throw in the towel still or discard your organisation.
Solution 1: Reconfiguring the dpkg Package
One of the triggers of this fault is a corrupted dpkg database. This can be acquired by the sudden intermission of the installation of a software package. Reconfiguring the database is one way to resolve this event.
To do this, simply execute the command:
$ sudo dpkg --configure -a
This reconfigures the unpacked packages that were not installed during the installation process.
Solution 2: Force Install the Troublesome Bundle
Sometimes, errors tin occur during the installation of software packages. When such happens, you tin force install the package using the -f
option as shown.
$ sudo apt install -f OR $ sudo apt install --fix-cleaved
The -f
choice & --gear up-cleaved
can be interchangeably used to set broken dependencies resulting from an interrupted package or cached package download.
Solution 3: Purge the Bad or Corrupted Software Package
If the first two solutions did not fix the problem, you can remove or purge the problematic software package equally shown.
$ sudo apt remove --purge package_name
For example, in my instance, purging the Google chrome package stock-still the issue.
$ sudo apt remove --purge google-chrome-stable
Then invoke the commands beneath to remove all the onetime, unused, and unnecessary packages which also frees upwardly space on your difficult drive.
$ sudo apt clean $ sudo apt autoremove
Solution four: Remove all the Files Associated with the Package
Lastly, you can manually remove all the associated with the troublesome parcel. First, you need to detect these files which are located in the /var/lib/dpkg/info directory every bit shown.
$ sudo ls -l /var/lib/dpkg/info | grep -i package_name
After listing the files, you can move them to the /tmp directory as shown
$ sudo mv /var/lib/dpkg/info/parcel-proper name.* /tmp
Alternatively, you can apply the rm command to manually remove the files.
$ sudo rm -r /var/lib/dpkg/info/packet-name.*
Finally, update the package lists as shown:
$ sudo apt update
You can thereafter give it another shot in reinstalling the software package.
Decision
This type of dpkg fault points to an upshot with the package installer unremarkably caused by the suspension of an installation process or a corrupt dpkg database.
Any of the above-mentioned solutions should fix this mistake. If y'all have come up this far, then it's our hope that the event has been successfully resolved and that you were able to reinstall your software bundle.
If You Capeesh What Nosotros Do Hither On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or scan the thousands of published articles available FREELY to all.
If you like what yous are reading, delight consider ownership us a coffee ( or 2 ) as a token of appreciation.
Nosotros are thankful for your never ending support.
Source: https://www.tecmint.com/sub-process-usr-bin-dpkg-returned-an-error-in-ubuntu/
0 Response to "Error in Install.packages : Error Reading From Connection"
إرسال تعليق