在 Linux 上安装 IOTEdge

在 Linux 上安装 IOTEdge

我正在关注这个教程: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-linux

当我尝试执行 sudo apt-get install iotedge

我有以下错误

xx@xx:/etc/apt $  sudo apt-get install iotedge
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 iotedge : Depends: libssl1.1 (>= 1.1.0) but it is not installable
           Depends: libiothsm-std (= 1.0.9.4-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

知道我遗漏了什么吗?

答案1

就您的情况而言,根据错误信息,似乎是依赖项导致了问题。可以按如下方法解决:

对于 Ubuntu 20.04:

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.8_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.8_amd64.deb
wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/libi/libiothsm-std/libiothsm-std_1.1.9-1_arm64.deb
sudo dpkg -i libiothsm-std_1.1.9-1_arm64.deb
rm libiothsm-std_1.1.9-1_arm64.deb libssl1.1_1.1.1f-1ubuntu2.8_amd64.deb

对于 Ubuntu 18.04:

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.13_amd64.deb
sudo dpkg -i "libssl1.1_1.1.1-1ubuntu2.1~18.04.13_amd64.deb"
wget https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/libi/libiothsm-std/libiothsm-std_1.0.8-2_amd64.deb
sudo dpkg -i libiothsm-std/libiothsm-std_1.0.8-2_amd64.deb
rm libiothsm-std/libiothsm-std_1.0.8-2_amd64.deb libssl1.1_1.1.1-1ubuntu2.1~18.04.13_amd64.deb

这应该可以完成工作。我基本上只是使用从 Ubuntu 存储库下载了依赖项wget,并使用dpkg第 2 步为每个存储库安装了 2 次。然后我在安装存储库后使用 rm 删除了存储库,因为您不再需要这些文件。

希望您的问题现在已经解决!!

相关内容