Azure / iotedge

The IoT Edge OSS project
MIT License
1.47k stars 462 forks source link

Error installing moby-engine on Ubuntu 18.04 64 bit on Nvidia Jetson Nano #5011

Closed ce314 closed 3 years ago

ce314 commented 3 years ago

I am following the directions from here: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge?view=iotedge-2020-11

When I execute the command : sudo apt-get install moby-engine

I get the following output: 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: moby-engine : Depends: moby-containerd (>= 1.4.3) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I follow the trouble shooting commands however everything is enabled under Generally NEccessary and Network Drivers. So I am unsure how to fix this error. If someone could help that has experience with iotedge devices that would be great.

darobs commented 3 years ago

Hi @ce314,

Very frustrating, I'm sorry this is happening. If you did the apt update, can you try to sudo apt-get install moby-containerd and see what it says?

ce314 commented 3 years ago

Hi @darobs, This is what I get: 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: moby-containerd : Depends: moby-runc (>= 1.0.0~rc10) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

darobs commented 3 years ago

OK - tried this on a Pi running Ubuntu 18.04 arm64, and I didn't experience problems, although I did remove docker-ce before starting (see session log below). Is it possible you had experienced a service disruption that messed up apt?

Try:

sudo apt-get update
sudo apt-get install moby-engine -f
Session log follows ```bash ubuntu@pi-3:~$ sudo apt remove docker-ce Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: cgroupfs-mount libltdl7 linux-raspi2-5.3-headers-5.3.0-1033 pigz Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: docker-ce 0 upgraded, 0 newly installed, 1 to remove and 115 not upgraded. After this operation, 84.2 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 152322 files and directories currently installed.) Removing docker-ce (5:19.03.13~3-0~ubuntu-bionic) ... ubuntu@pi-3:~$ cd ubuntu@pi-3:~$ ls iotedge rocksdb ubuntu@pi-3:~$ curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 101 100 101 0 0 158 0 --:--:-- --:--:-- --:--:-- 158 ubuntu@pi-3:~$ sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/ ubuntu@pi-3:~$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 983 100 983 0 0 3916 0 --:--:-- --:--:-- --:--:-- 3900 ubuntu@pi-3:~$ sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/ ubuntu@pi-3:~$ sudo apt-get update Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease Get:2 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic InRelease [29.8 kB] Get:3 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main arm64 Packages [19.1 kB] Get:4 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main all Packages [553 B] Get:5 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main armhf Packages [11.6 kB] Get:6 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main amd64 Packages [24.2 kB] Hit:7 http://ports.ubuntu.com/ubuntu-ports bionic InRelease Hit:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease Hit:9 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease Hit:10 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease Fetched 85.3 kB in 4s (21.7 kB/s) Reading package lists... Done ubuntu@pi-3:~$ sudo apt-get install moby-engine Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libltdl7 linux-raspi2-5.3-headers-5.3.0-1033 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: moby-buildx moby-cli moby-containerd moby-runc Suggested packages: aufs-tools The following packages will be REMOVED: containerd.io docker-ce-cli The following NEW packages will be installed: moby-buildx moby-cli moby-containerd moby-engine moby-runc 0 upgraded, 5 newly installed, 2 to remove and 113 not upgraded. Need to get 75.5 MB of archives. After this operation, 107 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main arm64 moby-buildx arm64 0.5.1+azure-1 [18.9 MB] Get:2 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main arm64 moby-cli arm64 20.10.6+azure-1 [10.8 MB] Get:3 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main arm64 moby-runc arm64 1.0.0~rc95+azure-1 [6009 kB] Get:4 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main arm64 moby-containerd arm64 1.4.6+azure-1 [23.1 MB] Get:5 https://packages.microsoft.com/ubuntu/18.04/multiarch/prod bionic/main arm64 moby-engine arm64 20.10.6+azure-1 [16.7 MB] Fetched 75.5 MB in 11s (7104 kB/s) (Reading database ... 152314 files and directories currently installed.) Removing containerd.io (1.3.7-1) ... Removing docker-ce-cli (5:19.03.13~3-0~ubuntu-bionic) ... Selecting previously unselected package moby-buildx. (Reading database ... 152095 files and directories currently installed.) Preparing to unpack .../moby-buildx_0.5.1+azure-1_arm64.deb ... Unpacking moby-buildx (0.5.1+azure-1) ... Selecting previously unselected package moby-cli. Preparing to unpack .../moby-cli_20.10.6+azure-1_arm64.deb ... Unpacking moby-cli (20.10.6+azure-1) ... Selecting previously unselected package moby-runc. Preparing to unpack .../moby-runc_1.0.0~rc95+azure-1_arm64.deb ... Unpacking moby-runc (1.0.0~rc95+azure-1) ... Selecting previously unselected package moby-containerd. Preparing to unpack .../moby-containerd_1.4.6+azure-1_arm64.deb ... Unpacking moby-containerd (1.4.6+azure-1) ... Selecting previously unselected package moby-engine. Preparing to unpack .../moby-engine_20.10.6+azure-1_arm64.deb ... Unpacking moby-engine (20.10.6+azure-1) ... Setting up moby-cli (20.10.6+azure-1) ... Setting up moby-buildx (0.5.1+azure-1) ... Setting up moby-runc (1.0.0~rc95+azure-1) ... Setting up moby-containerd (1.4.6+azure-1) ... Setting up moby-engine (20.10.6+azure-1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... ubuntu@pi-3:~$ sudo docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ubuntu@pi-3:~$ ```
darobs commented 3 years ago

Hi @ce314,

Any luck?

ce314 commented 3 years ago

Sorry, forgot to respond but it did not work however I decided to go a different direction that did not need the Moby engine. Thanks for your help!

varunpuranik commented 3 years ago

Thanks @ce314 for the update. I will close this issue. Curious to know what direction you decided to go in... would you mind sharing?

Amethyst6000 commented 2 years ago

I met exactly the same issue on Nvidia Jetson Nano on Ubuntu 18.04 following the steps in https://docs.microsoft.com/en-us/azure/iot-edge/how-to-provision-single-device-linux-symmetric?view=iotedge-2020-11&tabs=azure-portal after

sudo apt-get install moby-engine

got message:

Reading package lists...
Building dependency tree...
Reading state information...
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:
 moby-engine : Depends: moby-containerd (>= 1.4.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Check Generally Necessary and Network Drivers items were all enable.

I also tried @darobs's suggestion, but unfortunately it still doesn't work because it's different on Jetson.

pgrudzien12 commented 2 years ago

I just conducted the installation on jetson nano:

jetbot@jetbot-desktop:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

At the beginning, I got similar errors but slightly different yours, @Amethyst6000. Try this and look closely at the issues you got, it should tell you what deps are wrong. For me, it was docker-ce which I didn't care about at this point.

jetbot@jetbot-desktop:~$ sudo apt-get install moby-engine
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:
 moby-engine : Depends: moby-containerd (>= 1.4.3) but it is not going to be installed
               Depends: moby-runc (>= 1.0.0~rc93) but it is not going to be installed
               Conflicts: docker.io but 20.10.7-0ubuntu5~18.04.3 is to be installed
               Recommends: moby-cli but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The solution for me was to install everything from down to top. Started with: sudo apt-get install moby-runc then sudo apt-get install moby-containerd and finally: sudo apt-get install moby-engine

Amethyst6000 commented 2 years ago

Those steps are very helpful! before those steps, I met conflict: runc, so I remove older package sudo apt-get remove runc then use @pgrudzien12 provided steps sudo apt-get install moby-runc sudo apt-get install moby-containerd sudo apt-get install moby-engine Finally completed the installation of moby-engine.

rahulkhairnarr commented 2 years ago

I just conducted the installation on jetson nano:

jetbot@jetbot-desktop:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

At the beginning, I got similar errors but slightly different yours, @Amethyst6000. Try this and look closely at the issues you got, it should tell you what deps are wrong. For me, it was docker-ce which I didn't care about at this point.

jetbot@jetbot-desktop:~$ sudo apt-get install moby-engine
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:
 moby-engine : Depends: moby-containerd (>= 1.4.3) but it is not going to be installed
               Depends: moby-runc (>= 1.0.0~rc93) but it is not going to be installed
               Conflicts: docker.io but 20.10.7-0ubuntu5~18.04.3 is to be installed
               Recommends: moby-cli but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The solution for me was to install everything from down to top. Started with: sudo apt-get install moby-runc then sudo apt-get install moby-containerd and finally: sudo apt-get install moby-engine

This works, thanks

Kralg commented 7 months ago

Hello,

I am having a similar issue. The goal is to install Device Update agent on Raspbian bullseye (11).

I was following for debian: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-provision-single-device-linux-symmetric?view=iotedge-1.5&viewFallbackFrom=iotedge-2020-11&preserve-view=true&tabs=azure-portal%2Cdebian

And at sudo systemctl restart docker I am getting: Dependency failed for Docker Application Container Engine. docker.service: Job docker.service/start failed with result 'dependency'.

I also tried to uninstall these packages and install one by one: sudo apt-get install moby-runc sudo apt-get install moby-containerd sudo apt-get install moby-engine

Can you please write what could be the reason for this error ?