If like me, you have a shiny new Ubuntu running on your HyperV server, you want to install the Log Analytics agent for Linux. You run the install command below.
sudo wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh && sh onboard_agent.sh -w WorkspaceId -s key
and then you get a nice error. “Pyhton is not configured or Python does not support ctypes on this system, installation cannot continue.”
This error message is useless, at least on Ubuntu 16.04 and 18.04.
First, running the command with –force throws an error saying it doesn’t support that command.
Second, “import cytpes” in python throws an error or does nothing, or says its already installed.
After much searching, both months ago and recently when this issue came up again. I finally found the solution is extremely easy, thanks to this post.
simply run
sudo apt-get install -y python-ctypes
Then if you re-run the Linux Agent command it will not throw error 61 and instead will install successfully.