For my case I am using docker in windows 10 got the same error when installing Zookeper and kafka
I have selected Switch to linux container then automatically my zookeeper and kafka installation started