While installing Motion Eye on the raspberry pi 3. Try the following that worked for me:

sudo apt install libcurl4-openssl-dev libssl-dev