In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to solve the problem of "sub process usr bin dpkg returned an error code 1" error in Ubuntu. It is very detailed and has a certain reference value. Interested friends must read it!
If you encounter "sub process usr bin dpkg returned an error code 1" when installing software on Ubuntu Linux, please follow these steps to fix it.
A common problem in Ubuntu and other Debian-based distributions is corrupted packages. You will encounter errors like "Sub-process / usr/bin/dpkg returned an error code" when you try to update your system or install a new package.
This is what happened to me the other day. When I tried to install a radio program in Ubuntu, it gave me this error:
Unpacking python-gst-1.0 (1.6.2-1build1)... Selecting previously unselected package radiotray.Preparing to unpack... / radiotray_0.7.3-5ubuntu1_all.deb... Unpacking radiotray (0.7.3-5ubuntu1)... Processing triggers for man-db (2.7.5-1)... Processing triggers for desktop-file-utils (0.22-1ubuntu5.2)... Processing triggers for bamfdaemon (0.5.3 million bzr0 / 16.04.20180209- 0ubuntu1)... Rebuilding / usr/share/applications/bamf-2.index...Processing triggers for gnome-menus (3.13.3-6ubuntu3.1)... Processing triggers for mime-support (3.59ubuntu1)... Setting up polar-bookshelf (1.0.0-beta56)... ln: failed to create symbolic link'/ usr/local/bin/polar-bookshelf': No such file or directorydpkg: error processing package polar-bookshelf (--configure): subprocess installed post-installation script Returned error exit status 1Setting up python-appindicator (12.10.1 to 16.04.20170215-0ubuntu1)... Setting up python-gst-1.0 (1.6.2-1build1)... Setting up radiotray (0.7.3-5ubuntu1)... Errors were encountered while processing:polar-bookshelfE: Sub-process / usr/bin/dpkg returned an error code (1)
The three lines are very important here.
Errors were encountered while processing:polar-bookshelfE: Sub-process / usr/bin/dpkg returned an error code (1)
It tells me that the polar-bookshelf package caused a problem. This may be crucial to how you fix the mistake.
Repair Sub-process / usr/bin/dpkg returned an error code (1)
Let's try to fix this damaged error package. I'm going to show you several ways you can try one by one. The first ones are easy to use and hardly use your head.
After trying each of the methods discussed here, you should try to run sudo apt update, and then try to install a new package or upgrade.
Method 1: reconfigure the package database
The only way you can try is to reconfigure the package database. The database may have been corrupted while installing the package. Reconfiguration usually solves the problem.
Sudo dpkg-- configure-a method 2: force installation
If the previous package installation process was interrupted, you can try to force the installation.
Sudo apt-get install-f method 3: try to delete the problematic package
If this is not your problem, you can try to delete the package manually. Do not do this for the Linux kernel package, which starts with linux-.
Sudo apt remove method 4: delete the information file in the problematic package
This should be your choice. You can try to delete the files associated with the related packages from / var/lib/dpkg/info.
You need to know some basic Linux commands to understand what's going on and how to respond to your problems.
As far as I'm concerned, I have a problem with polar-bookshelf. So I looked up the file associated with it:
Ls-l / var/lib/dpkg/info | grep-I polar-bookshelf-rw-r--r-- 1 root root 2324811 Aug 14 19:29 polar-bookshelf.list-rw-r--r-- 1 root root 2822824 Aug 10 04:28 polar-bookshelf.md5sums-rwxr-xr-x 1 root root 113 Aug 10 04:28 polar-bookshelf.postinst-rwxr-xr-x 1 root root 84 Aug 10 04:28 polar-bookshelf.postrm
Now all I need to do is delete these files:
Sudo mv / var/lib/dpkg/info/polar-bookshelf.* / tmp
Use sudo apt update and then you should be able to install the software as usual.
The above is all the contents of this article entitled "how to solve the problem of sub process usr bin dpkg returned an error code 1" errors in Ubuntu. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.