0

The last thing I have installed was lazarus and now when I try to install anything with apt I get a error. Lazarus compiles just fine without any errors. Example.

$ sudo apt-get install ffmpeg
[sudo] password for user:                 
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:
 ffmpeg : Depends: libavdevice-ffmpeg56 (>= 7:2.6) but it is not going to be installed
 fp-utils-3.0.0 : Depends: fpc-source-3.0.0 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

So I run sudo apt-get -f install

~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  gir1.2-javascriptcoregtk-4.0 gir1.2-json-1.0 gir1.2-soup-2.4 gir1.2-webkit2-4.0
  libappstream3 libatkmm-1.6-1v5 libcairomm-1.0-1v5 libglibmm-2.4-1v5 libido3-0.1-0
  libpangomm-1.4-1v5 libsigc++-2.0-0v5 libvala-0.32-0 sbsigntool
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  fpc-source-3.0.0
The following NEW packages will be installed:
  fpc-source-3.0.0
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
98 not fully installed or removed.
Need to get 0 B/15.7 MB of archives.
After this operation, 166 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 223502 files and directories currently installed.)
Preparing to unpack .../fpc-source-3.0.0_3.0.0+dfsg-2_all.deb ...
Unpacking fpc-source-3.0.0 (3.0.0+dfsg-2) ...
dpkg: error processing archive /var/cache/apt/archives/fpc-source-3.0.0_3.0.0+dfsg-2_all.deb (--unpack):
 trying to overwrite '/usr/share/fpcsrc/3.0.0/rtl/android/jvm/java_sys_android.inc', which is also in package fpc-src 3.0.0
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/fpc-source-3.0.0_3.0.0+dfsg-2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

[EDIT]: No matter what I use apt for I still get the same error. Even after trying to remove the package causing the issue.

~$ sudo apt remove fpc-src
[sudo] password for user:                 
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:
 fp-utils-3.0.0 : Depends: fpc-source-3.0.0 but it is not going to be installed
 lazarus-project : Depends: fpc-src (>= 3.0.0) but it is not going to be installed or
                            fpc-source (>= 3.0.0)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

2 Answers 2

1

After trying to fix this countless of times I found a solution.

First I ran

sudo dpkg --configure -a

then

sudo apt-get install -f (Too see what package gives the problem)

After I saw the problem was still there I edited it manually.

I Located the corrupt package, and removed the whole block of information about it and saved the file.

sudo -i nano /var/lib/dpkg/status

After I removed the broken package I ran sudo apt-get install -f and it fixed apt-get

0

You will have to remove the fpc-srcpackage first (sudo apt remove fpc-src), and run apt-get install -f after (and reinstall the new packages eventually).

1
  • No matter what I use it still gives me the same error. I basically can't use apt
    – Newb101
    Feb 6, 2017 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.