I am making something to show my school which will be installed on multiple RasPi 3s, using Stretch Lite. Because of this, I have made an 'install script' which runs all of the installing packages and installing python stuff. All of the lines can be run exactly as is from the CLI, but when I put them into a .sh file and do sudo chmod +x, it doesn't work when I do ./install.sh.
Here is the error:
E: Invalid operation update E: Invalid operation upgrade Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python-dev ./install.sh: 4: ./install.sh: pip3: not found ./install.sh: 5: ./install.sh: git: not found ./install.sh: 6: cd: can't cd to Adafruit_Python_DHT python3: can't open file 'setup.py': [Errno 2] No such file or directory ./install.sh: 8: cd: can't cd to ../flask-prod chmod: cannot access 'service.sh'$'\r': No such file or directory
The files are here and the install script is called 'install.sh'
This was my original install.sh file:
apt-get update -y apt-get upgrade -y apt-get install python3-pip apache2 apache2-utils libexpat1 ssl-cert libapache2-mod-wsgi git-core python-dev -y pip3 install flask git clone https://github.com/adafruit/Adafruit_Python_DHT.git cd Adafruit_Python_DHT python3 setup.py install cd flask-prod chmod +x service.sh