gpt4 book ai didi

c++ - libcurl4-openssl-dev :armhf cannot be installed when libcurl4-openssl-dev is already installed

转载 作者:太空狗 更新时间:2023-10-29 23:12:06 41 4
gpt4 key购买 nike

我在 Debian Jessie 8.10 amd64 上创建了一个 c++ 应用程序,它还需要以下库:

sudo apt-get install libssl-dev
sudo apt-get install libcurl4-openssl-dev

我还需要交叉编译armhf的源代码。所以根据这个非常有用的链接 https://wiki.embeddedarm.com/wiki/Jessie_armhf_Cross_Compile我给出了以下命令:

sudo apt-get install curl build-essential
su root
echo "deb http://emdebian.org/tools/debian jessie main" >
/etc/apt/sources.list.d/emdebian.list
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
dpkg --add-architecture armhf
apt-get update
apt-get install crossbuild-essential-armhf

一切都已正确安装,然后我还给出了:

 sudo apt-get install libssl-dev:armhf
sudo apt-get install libcurl4-openssl-dev:armhf

第一个命令执行成功。另一方面,第二个未能给出以下输出:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libcurl4-doc:armhf libcurl3-dbg:armhf libidn11-dev:armhf libkrb5-dev:armhf libldap2-dev:armhf
librtmp-dev:armhf libssh2-1-dev:armhf pkg-config:armhf
The following NEW packages will be installed:
libcurl4-openssl-dev:armhf
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
23 not fully installed or removed.
Need to get 0 B/316 kB of archives.
After this operation, 863 kB of additional disk space will be used.
(Reading database ... 94032 files and directories currently installed.)
Preparing to unpack .../libcurl4-openssl-dev_7.38.0-4+deb8u8_armhf.deb ...
Unpacking libcurl4-openssl-dev:armhf (7.38.0-4+deb8u8) ...
dpkg: error processing archive /var/cache/apt/archives/libcurl4-openssl-dev_7.38.0-4+deb8u8_armhf.deb (--unpack):
trying to overwrite shared '/usr/include/curl/curlbuild.h', which is different from other instances of package libcurl4-openssl-dev:armhf
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/libcurl4-openssl-dev_7.38.0-4+deb8u8_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

由于我在交叉编译过程中还很陌生,有人知道我做错了什么吗?

最佳答案

你没有做错任何事。这是与多体系结构包相关的文件冲突。这是一个 bug in the package

这是对此类错误的解释,来自 https://wiki.debian.org/MultiArch/Hints

The package in question is marked Multi-Arch: same, but has conflicting versions of at least one file for different architectures. The hint tells the filename (or the number of filenames) and the architectures (or number of architectures) in question. The easiest way to fix is to remove the Multi-Arch: same declaration, but often enough it can be fixed by moving the offending files to per-architecture locations (typically /usr/lib/$(DEB_HOST_MULTIARCH)/). For *-dev packages, the Multi-Arch: same capability often is not critical and removing is a good initial measure.

我只是遇到了同样的问题,这仍然是一些软件包的问题。在我的例子中,libcurl-openssl-dev 替换了 /usr/bin/curl-config 二进制文件。

对我来说,当我需要交叉编译时需要从 x64/i386 库进行交换,但我很清楚这可能不是对每个人都可行。

关于c++ - libcurl4-openssl-dev :armhf cannot be installed when libcurl4-openssl-dev is already installed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48213802/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com