Error when ceate and preconfigure IoT Edge devices using symmetric keys on Linux

Zhiming Zhou (SSE, 222012061) 0 Reputation points
2023-04-08T13:50:14.21+00:00

I was trying to run the following commands while learning ”Ceate and preconfigure IoT Edge devices using symmetric keys on Linux“ with raspberry pi 4B (bullseye)https://learn.microsoft.com/zh-cn/azure/iot-edge/how-to-provision-single-device-linux-symmetric?view=iotedge-1.4&tabs=azure-cli%2Cdebian

curl https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb > ./packages-microsoft-prod.deb
sudo apt install ./packages-microsoft-prod.deb

then I encounter this error:

The following packages have unmet dependencies:Defender-IoT-Micro-Agent-Edge: depends on aziot-edge, but it is not installed.

Then I try to run this command to deal iwith this error

apt --fix-broken install

but it comes out like this:

ERROR: No container runtime detected.  
Please install a container runtime and run this install again. 

E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I solve this problem?

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
561 questions
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,966 Reputation points
    2023-04-25T22:17:25.9733333+00:00

    Hi @Zhiming Zhou (SSE, 222012061) I am following up to see if you are still experiencing any issues. I have tested the command on Raspberry Pi 2B with the OS version Raspbian GNU/Linux 11 (bullseye) and did not experience any issues.

    Please find the below image for your reference and notice that the command systemctl status defender-iot-micro-agent.service which is used to check the status of Defender-IoT-Micro-Agent-Edge returns the status cannot be found. User's image

    Please follow the steps in the article Install Defender for IoT micro agent for Edge to install the agent if you still face the same issue.

    Execute the command sudo apt-get update before you try to install the packages and see if that helps.

    ERROR: No container runtime detected. Please install a container runtime and run this install again.

    The command apt --fix-broken install does not need any container installation to run. Can you execute the command systemd-detect-virt to check if there are any containers/virtualization set up on your Raspberyy Pi? If the output of the command is not none it implies that you are running the command from a container and there is no container runtime on the machine.

    Please let us know if you need further assistance in the comments below and we would be glad to help you.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    0 comments No comments