libgnuradio-iqbalance 导致错误“sudo apt-get -f install”

libgnuradio-iqbalance 导致错误“sudo apt-get -f install”

我在 Ubuntu 终端上运行了sudo apt-get upgrade命令,其中有三个软件包需要升级,(libgnuradio-iqbalance)和另外两个。libgnuradio-iqbalance升级过程失败。它说应该运行sudo apt-get -f install,我已经运行了它,但它并没有解决我的问题。

ayad@Ayad:~$ sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libgnuradio-iqbalance
The following NEW packages will be installed:
  libgnuradio-iqbalance
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
Need to get 0 B/93.4 kB of archives.
After this operation, 532 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: warning: files list file for package 'arduino' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'arduino-core' missing; assuming package has no files currently installed
(Reading database ... 495085 files and directories currently installed.)
Preparing to unpack .../libgnuradio-iqbalance_0.37.2-myriadrf5~xenial_amd64.deb ...
Unpacking libgnuradio-iqbalance (0.37.2-myriadrf5~xenial) ...
dpkg: error processing archive /var/cache/apt/archives/libgnuradio-iqbalance_0.37.2-myriadrf5~xenial_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libgnuradio-iqbalance.so', which is also in package gr-iqbal 0.37.2-5
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libgnuradio-iqbalance_0.37.2-myriadrf5~xenial_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ayad@Ayad:~$

答案1

从上面的问题可以清楚地看出,系统尝试安装libgnuradio-iqbalance软件包,但无法安装。在修复此问题之前,我无法做很多事情,所以我打算删除需要libgnuradio-iqbalance软件包的软件包。我输入了sudo apt-get upgrade命令,输出如下::

ayad@Ayad:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 gr-osmosdr : Depends: libgnuradio-iqbalance but it is not installed
 libgnuradio-osmosdr0.1.4 : Depends: libgnuradio-iqbalance but it is not installed
E: Unmet dependencies. Try using -f.

很明显,我有两个包需要libgnuradio-iqbalance包。因此,我尝试使用sudo apt-get remove PACKAGE_NAME命令删除它们,输出如下::

ayad@Ayad:~$ sudo apt-get remove gr-osmosdr 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libgnuradio-osmosdr0.1.4 : Depends: libgnuradio-iqbalance but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
ayad@Ayad:~$ sudo apt-get remove libgnuradio-osmosdr0.1.4 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 gqrx-sdr : Depends: libgnuradio-osmosdr0.1.4 but it is not going to be installed
 gr-osmosdr : Depends: libgnuradio-osmosdr0.1.4 but it is not going to be installed
              Depends: libgnuradio-iqbalance but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

从终端的输出中,我们可以看到gr-osmosdr无法删除该包。对于libgnuradio-osmosdr0.1.4包也是如此,因为它是gr-osmosdrgqrx-sdr包所必需的。所以我去删除gqrx-sdr包,但无法删除。

通过互联网搜索,我找到了一种方法来删除这些包这里,使用sudo dpkg --remove --force-remove-reinstreq PACKAGE_NAME命令。然后我输入了以下内容::

ayad@Ayad:~$ sudo dpkg --remove --force-remove-reinstreq gqrx-sdr
dpkg: warning: files list file for package 'arduino' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'arduino-core' missing; assuming package has no files currently installed
(Reading database ... 364867 files and directories currently installed.)
Removing gqrx-sdr (2.5.3-gqrx4~xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
ayad@Ayad:~$ sudo dpkg --remove --force-remove-reinstreq gr-osmosdr
dpkg: warning: files list file for package 'arduino' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'arduino-core' missing; assuming package has no files currently installed
(Reading database ... 364858 files and directories currently installed.)
Removing gr-osmosdr (0.1.4.75.ae686c4-myriadrf3~xenial) ...
Processing triggers for man-db (2.7.5-1) ...
ayad@Ayad:~$ sudo apt-get remove libgnuradio-osmosdr0.1.4 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gr-fcdproplus libairspy0 libbladerf1 libgnuradio-fcdproplus0 libhackrf0 libmirisdr0 libosmodsp libosmosdr0 libsoapysdr0.5-2
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libgnuradio-osmosdr0.1.4
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
10 not fully installed or removed.
After this operation, 1,052 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: warning: files list file for package 'arduino' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'arduino-core' missing; assuming package has no files currently installed
(Reading database ... 364826 files and directories currently installed.)
Removing libgnuradio-osmosdr0.1.4:amd64 (0.1.4.75.ae686c4-myriadrf3~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Setting up libgnuradio-fcdproplus0 (10.0.1.0-myriadrf5~xenial) ...
Setting up gr-fcdproplus (10.0.1.0-myriadrf5~xenial) ...
Setting up libosmodsp (0.3.0-myriadrf1~xenial) ...
Setting up libsoapysdr0.5-2:amd64 (0.5.3.1.609808b-myriadrf1~xenial) ...
Setting up libairspy0:amd64 (1.0.8-1~ubuntu16.04.1~myriadrf1) ...
Setting up libbladerf1:amd64 (0.2016.01~rc1-3) ...
Setting up libhackrf0:amd64 (2015.07.2-6) ...
rmmod: ERROR: Module hackrf is not currently loaded
Setting up libmirisdr0:amd64 (0.0.4.59ba37-4) ...
Setting up libosmosdr0:amd64 (0.1.8.effcaa7-5) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...

然后我输入sudo apt-get upgrade命令。

ayad@Ayad:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  gr-fcdproplus libairspy0 libbladerf1 libgnuradio-fcdproplus0 libhackrf0 libmirisdr0 libosmodsp libosmosdr0 libsoapysdr0.5-2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

完成。

现在我要删除 gnuradio 并重新安装它,因为我认为其中缺少一些文件。

相关内容