In thisMongoDB tutorial, I will explain how I managed to lớn resolve sầu the error“E: Sub-process /usr/bin/dpkg returned an error code (1)”.
Bạn đang xem: Linux
Sub-process /usr/bin/dpkg returned an error code (1)Reason: Sub-process /usr/bin/dpkilogam returned an error code (1)Solution: Sub-process /usr/bin/dpkg returned an error code (1)ConclusionRecently, when I was trying toinstall the MongoDB database in the ubuntu operating system (đôi mươi.04), I faced the error “Sub-process /usr/bin/dpkg returned an error code (1)“. You can see the error below:
I properly followed the correct comm&, but still faced this error.
Don’t worry if you don’t know how to resolve sầu these issues. In the below steps, we will discuss the reason for getting the error và also resolve sầu the error.
When I searched it on the website, I found many posts and blogs on this error. Most of the blogs stated that this error was triggered because of a failed software installation or the installer becomes corrupted.
So if it is damaged and you are trying any new software installation will cause this error message.
When I was trying lớn troubleshoot this error in the Ubuntu operating system. I found the solution for this.
The installer becomes corrupted that is the only reason we are getting errors. The key phrase in the error is /usr/bin/dpkg. Here, the dpkilogam is the package installer for Linux và it tracks software updates and dependencies.
Xem thêm: Cách Làm Súp Gà Cho Bé Trên 1 Tuổi Khiến Bé Thích Mê, Súp Gà Cho Bé
Now, follow the below steps khổng lồ fix the error dpkilogam returned an error code 1:
Open the terminalUse the below code to lớn move sầu the dpkg info file into another filesubởi vì mv /var/lib/dpkg/info /var/lib/dpkg/info_silentHere, we moved the info tệp tin into the info_silent file on the same path “/var/lib/dpkg/info_silent”. You can take any name for the new file (info_silent).
Now create a new directory info in dpkg folder, use the below commandsuvị mkdir /var/lib/dpkg/infoExdễ thương the update comm& lớn download package information from all configured sourcessuvì chưng apt-get update
suvày mv /var/lib/dpkg/info/* /var/lib/dpkg/info_silentRemove the info directory, use the below commandsuvị rm -rf /var/lib/dpkg/infoNow, again move all the tệp tin of the info_silent directory into lớn the info directory.suvì mv /var/lib/dpkg/info_silent /var/lib/dpkg/infoUse the below code to lớn updates the list of available packages & their versionssubởi apt-get updateAfter updating the lists, the package manager knows about available updates for the software you have installed.Use the upgrade command lớn installs newer versions of the packages you have sầu.suvì chưng apt-get upgrade
You may also lượt thích khổng lồ read the following MongoDB tutorials.
Thus, you might have learned the cause và the solution of the error“ Sub-process /usr/bin/dpkg returned an error code (1) ”.
Sub-process /usr/bin/dpkilogam returned an error code (1)Reason: Sub-process /usr/bin/dpkilogam returned an error code (1)Solution: Sub-process /usr/bin/dpkilogam returned an error code (1)Conclusion