我正在尝试安装 lazarus这里。我的软件包损坏了,但我通过删除以下源解决了问题:
gedit /var/lib/dpkg/status
如所述这里。然后我尝试再次安装 lazarus,lazarus 本身可以安装,但无法安装 fpc 和 fpc-src 包。它给出了以下错误:
Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 374429 files and directories currently installed.)
Unpacking fpc-src (from /tmp/fpc-src_2.6.2-0_amd64.deb) ...
dpkg: error processing /tmp/fpc-src_2.6.2-0_amd64.deb (--install):
trying to overwrite '/usr/share/fpcsrc/2.6.2/rtl/nativent/tthread.inc', which is also in package fpc-source-2.6.2 2.6.2-5
dpkg-deb (subprocess): decompressing archive member: internal gzip write error: Broken pipe
dpkg-deb (subprocess): cannot copy archive member from '/tmp/fpc-src_2.6.2-0_amd64.deb' to decompressor pipe: failed to write (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Errors were encountered while processing:
如果我从软件中心安装常规 fpc,它会删除 lazarus。
而且,在安装 lazarus 之前,我删除了主目录中所有以前的文件夹,包括 .lazarus 文件夹,因此,当我安装常规 lazarus 时,它说它已安装在软件中心,但在 dash 中找不到它,尽管 .lazarus 文件夹存在。
答案1
您需要fpc-source-2.6.2
先删除软件包才能安装fpc-src
。当然,两个软件包应该互相破坏:
sudo apt-get -f remove fpc-source-2.6.2
sudo apt-get install -f fpc-src
请考虑在 lazarus 中填写错误报告。
答案2
我重新安装了 ubuntu,现在可以正常工作了。