如何解决Ubuntu 20.04LTS上安装iotedge 错误: "unable to locate package iotedge"

针对于Ubuntu系统上的IoT Edge runtime 安装, 微软官方文档 Install Azure IoT Edge 中只提到了 16.04 和 18.04版本,并未提及20.04版本, 很多用户现在都喜欢用最新的版本来做开发工作,那就会发现如果仅仅把安装包的路径改为20.04的话,会遇到如下错误:

根据微软的文档, Ubunto 20.04是处于Tier2 support的 Supported operating systems, container engines - Azure IoT Edge

最后面这有一句话提到 "The Debian 9 packages from Azure IoT Edge releases repro should work out of the box with Ubuntu 20.04", 这里的意思就是说对于Ubuntu 20.04来讲可以用Debian 9的package。

另外,我们经过研究发现,也可以用18.04的package。

解决方法

所以解决方案就是在安装respository configuration的时候 用18.04 或则Debian 9的版本, 命令如下:

curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list

Or

curl https://packages.microsoft.com/config/debian/9/multiarch/prod.list > ./microsoft-prod.list

Missing SSL Dependencies

有时候档安装iotedge runtime时候会遇到如下错误:

jess@jesspc:~$ 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.0.0 (>= 1.0.2~beta3) but it is not installable
E: Unable to correct problems, you have held broken packages.

意思是安装iotedge runtime之前要先装libssl, 步骤如下:

# download the libssl debian package
curl http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
# unpack the package
sudo dpkg -i ./libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
# try force any new packages to install
sudo apt-get install -f
# see if libssl was installed
apt list -a libssl
# if not, force it to install
sudo apt install ./libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
posted @ 2021-02-02 15:46  AED-Jesse  阅读(350)  评论(0编辑  收藏  举报