Unable to locate package libjpeg-dev

Use the Ubuntu Main Server.

sudo sed -i.bak 's/us-west-2\.ec2\.//' /etc/apt/sources.list

The command removes us-west-2.ec2. in /etc/apt/sources.list and creates a backup in /etc/apt/sources.list.bak