Issues installing Microsoft Defender for Endpoint (mdatp) on Debian 12 (Bookworm)

Mark Jones 0 Reputation points
2025-01-27T13:49:46.8733333+00:00

Hi,

I have two Debian 12 VMs running in Azure which I would like to install Defender for Endpoint (mdatp) on, but I am having issues with the Linux Software Repository for Microsoft products.

I am following the instructions here: Deploy Microsoft Defender for Endpoint on Linux manually - Microsoft Defender for Endpoint | Microsoft Learn

But the mdatp package can't be found. I believe this is because of an issue with the Repository for Debian 12.

When I run apt-get update I get the following:

W: Failed to fetch https://packages.microsoft.com/debian/12/prod/dists/bookworm/InRelease  Bad header line Bad header data

I've run through the Debian instructions on Linux Software Repository for Microsoft Products | Microsoft Learn, downloading the config from Microsoft and installing it. I've also made sure the public keys are in the right place by running:

curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg

After apt-get update when I check the contents of /var/lib/apt/lists there is nothing Microsoft related in there, which is why I believe it can't find mdatp.

Any assistance appreciated!

Thanks,

Mark

Microsoft Defender for Cloud
Microsoft Defender for Cloud
An Azure service that provides threat protection for workloads running in Azure, on-premises, and in other clouds. Previously known as Azure Security Center and Azure Defender.
1,474 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcus Spiegel 0 Reputation points
    2025-01-28T17:24:52.1833333+00:00

    ran into the same problem and found a hint at https://github.com/microsoft/vscode/issues/226935#issuecomment-2321824915

    now from within the VM I was able to resolve my issues with a sequence of:

    $ curl -o  /etc/apt/sources.list.d/microsoft-prod.list https://packages.microsoft.com/config/debian/12/prod.list
    $ curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-prod.gpg > /dev/null
    $ apt clean && apt autoclean && apt update && apt install mdatp
    

    work for me... maybe for others?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.