Hallo zusammen,
ich wollte mir ein setup-Skript für mein Projekt auf dem Raspberr Pi schreiben. Damit ich nicht immer alles selber installieren muss. Allerdings funktioniert dabei so ziemlich gar nichts und die Fehlermeldungen verstehe ich auch nicht so wirklich Ich muss dazu sagen, dass ich bisher noch nicht wirklich viel mit Shell-Scripts gearbeitet habe.
Ich wäre dankbar, wenn mir hier jemand helfen könnte!!
Hier ist die Ausgabe zu dem Skript:
Code
: not foundsetup.sh: 2: canSniffer_setup.sh:
: not foundsetup.sh: 7: canSniffer_setup.sh:
Installing canSniffer...
: not foundsetup.sh: 9: canSniffer_setup.sh:
Create directories...
mkdir: cannot create directory '/home/pi/scripts/python/\r': No such file or directory
mkdir: cannot create directory '/home/pi/scripts/shell/\r': No such file or directory
mkdir: cannot create directory '/home/pi/projects/can_converter/bin/ARM/Debug/\r': No such file or directory
: not foundsetup.sh: 15: canSniffer_setup.sh:
Copying update.sh...
'update.sh' -> '/home/pi/scripts/shell/'$'\r'
cp: cannot create regular file '/home/pi/scripts/shell/'$'\r': No such file or directory
chmod: cannot access '/home/pi/scripts/shell/update.sh'$'\r': No such file or directory
: not foundsetup.sh: 20: canSniffer_setup.sh:
Updating system and apt package list...
sh: 0: Can't open /home/pi/scripts/shell/update.sh
: not foundsetup.sh: 24: canSniffer_setup.sh:
Installing Nqm/git...
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package git
: not foundsetup.sh: 28: canSniffer_setup.sh:
Installing Smbus for I2C-Python...
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-dev
: not foundsetup.sh: 32: canSniffer_setup.sh:
Installing I2C-Tools...
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package i2c-tools
: not foundsetup.sh: 36: canSniffer_setup.sh:
Copying set_ip.py...
'set_ip.py' -> '/home/pi/scripts/python/'$'\r'
cp: cannot create regular file '/home/pi/scripts/python/'$'\r': No such file or directory
chmod: cannot access '/home/pi/scripts/python/set_ip.py'$'\r': No such file or directory
: not foundsetup.sh: 42: canSniffer_setup.sh:
Installing apache...
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2
: not foundsetup.sh: 46: canSniffer_setup.sh:
Installing php5...
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5
: not foundsetup.sh: 50: canSniffer_setup.sh:
Restarting apache2...
canSniffer_setup.sh: 52: canSniffer_setup.sh: /etc/init.d/apache2: not found
: not foundsetup.sh: 53: canSniffer_setup.sh:
Installing sqlite3...
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-sqlite
: not foundsetup.sh: 57: canSniffer_setup.sh:
Change rights for directory /var/www...
chmod: cannot access '/var/www/'$'\r': No such file or directory
: not foundsetup.sh: 61: canSniffer_setup.sh:
Installing can-utils...
canSniffer_setup.sh: 64: canSniffer_setup.sh: git: not found
canSniffer_setup.sh: 65: cd: can't cd to can-utils
: not foundsetup.sh: 66: canSniffer_setup.sh: ./autogen.sh
: not foundsetup.sh: 67: canSniffer_setup.sh: ./configure
: not foundsetup.sh: 68: canSniffer_setup.sh: make
'. Stop. No rule to make target 'install
: not foundsetup.sh: 70: canSniffer_setup.sh:
Copying can-start.sh
'can-start.sh' -> '/home/pi/scripts/shell/'$'\r'
cp: cannot create regular file '/home/pi/scripts/shell/'$'\r': No such file or directory
chmod: cannot access '/home/pi/scripts/shell/can-start.sh'$'\r': No such file or directory
: not foundsetup.sh: 75: canSniffer_setup.sh:
Copying config.txt...
'config.txt' -> '/boot/'$'\r'
cp: cannot create regular file '/boot/'$'\r': Invalid argument
: not foundsetup.sh: 79: canSniffer_setup.sh:
Config the real-time-clock...
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package fake-hwclock
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] [-f] <basename> defaults
update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
-n: not really
-f: force
The disable|enable API is not stable and might change in the future.
: not foundsetup.sh: 84: canSniffer_setup.sh:
'hwclock-set' -> '/lib/udev/'$'\r'
: not foundsetup.sh: 86: canSniffer_setup.sh:
'wclock: invalid option -- '
Usage:
hwclock [function] [option...]
Query or set the hardware clock.
Functions:
-h, --help show this help text and exit
-r, --show read hardware clock and print result
--get read hardware clock and print drift corrected result
--set set the RTC to the time given with --date
-s, --hctosys set the system time from the hardware clock
-w, --systohc set the hardware clock from the current system time
--systz set the system time based on the current timezone
--adjust adjust the RTC to account for systematic drift since
the clock was last set or adjusted
-c, --compare periodically compare the system clock with the CMOS clock
--getepoch print out the kernel's hardware clock epoch value
--setepoch set the kernel's hardware clock epoch value to the
value given with --epoch
--predict predict RTC reading at time given with --date
-V, --version display version information and exit
Options:
-u, --utc the hardware clock is kept in UTC
--localtime the hardware clock is kept in local time
-f, --rtc <file> special /dev/... file to use instead of default
--directisa access the ISA bus directly instead of /dev/rtc
--badyear ignore RTC's year because the BIOS is broken
--date <time> specifies the time to which to set the hardware clock
--epoch <year> specifies the year which is the beginning of the
hardware clock's epoch value
--update-drift update drift factor in /etc/adjtime (requires
--set or --systohc)
--noadjfile do not access /etc/adjtime; this requires the use of
either --utc or --localtime
--adjfile <file> specifies the path to the adjust file;
the default is /etc/adjtime
--test do not update anything, just show what would happen
-D, --debug debugging mode
: not foundsetup.sh: 88: canSniffer_setup.sh: date
'wclock: invalid option -- '
Usage:
hwclock [function] [option...]
Query or set the hardware clock.
Functions:
-h, --help show this help text and exit
-r, --show read hardware clock and print result
--get read hardware clock and print drift corrected result
--set set the RTC to the time given with --date
-s, --hctosys set the system time from the hardware clock
-w, --systohc set the hardware clock from the current system time
--systz set the system time based on the current timezone
--adjust adjust the RTC to account for systematic drift since
the clock was last set or adjusted
-c, --compare periodically compare the system clock with the CMOS clock
--getepoch print out the kernel's hardware clock epoch value
--setepoch set the kernel's hardware clock epoch value to the
value given with --epoch
--predict predict RTC reading at time given with --date
-V, --version display version information and exit
Options:
-u, --utc the hardware clock is kept in UTC
--localtime the hardware clock is kept in local time
-f, --rtc <file> special /dev/... file to use instead of default
--directisa access the ISA bus directly instead of /dev/rtc
--badyear ignore RTC's year because the BIOS is broken
--date <time> specifies the time to which to set the hardware clock
--epoch <year> specifies the year which is the beginning of the
hardware clock's epoch value
--update-drift update drift factor in /etc/adjtime (requires
--set or --systohc)
--noadjfile do not access /etc/adjtime; this requires the use of
either --utc or --localtime
--adjfile <file> specifies the path to the adjust file;
the default is /etc/adjtime
--test do not update anything, just show what would happen
-D, --debug debugging mode
'wclock: invalid option -- '
Usage:
hwclock [function] [option...]
Query or set the hardware clock.
Functions:
-h, --help show this help text and exit
-r, --show read hardware clock and print result
--get read hardware clock and print drift corrected result
--set set the RTC to the time given with --date
-s, --hctosys set the system time from the hardware clock
-w, --systohc set the hardware clock from the current system time
--systz set the system time based on the current timezone
--adjust adjust the RTC to account for systematic drift since
the clock was last set or adjusted
-c, --compare periodically compare the system clock with the CMOS clock
--getepoch print out the kernel's hardware clock epoch value
--setepoch set the kernel's hardware clock epoch value to the
value given with --epoch
--predict predict RTC reading at time given with --date
-V, --version display version information and exit
Options:
-u, --utc the hardware clock is kept in UTC
--localtime the hardware clock is kept in local time
-f, --rtc <file> special /dev/... file to use instead of default
--directisa access the ISA bus directly instead of /dev/rtc
--badyear ignore RTC's year because the BIOS is broken
--date <time> specifies the time to which to set the hardware clock
--epoch <year> specifies the year which is the beginning of the
hardware clock's epoch value
--update-drift update drift factor in /etc/adjtime (requires
--set or --systohc)
--noadjfile do not access /etc/adjtime; this requires the use of
either --utc or --localtime
--adjfile <file> specifies the path to the adjust file;
the default is /etc/adjtime
--test do not update anything, just show what would happen
-D, --debug debugging mode
: not foundsetup.sh: 91: canSniffer_setup.sh:
Installing gwSocket...
--2018-01-18 16:07:33-- http://tar.gwsocket.io/gwsocket-0.2.tar.gz%0D
Resolving tar.gwsocket.io (tar.gwsocket.io)... 63.231.229.217
Connecting to tar.gwsocket.io (tar.gwsocket.io)|63.231.229.217|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-01-18 16:07:43 ERROR 404: Not Found.
tar (child): gwsocket-0.2.tar.gz\r: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
canSniffer_setup.sh: 96: cd: can't cd to gwsocket-0.2/
: not foundsetup.sh: 97: canSniffer_setup.sh: ./configure
: not foundsetup.sh: 98: canSniffer_setup.sh: make
'. Stop. No rule to make target 'install
: not foundsetup.sh: 100: canSniffer_setup.sh:
Installing gwSocket service script in /etc/init.d...
'gwsocket' -> '/etc/init.d/'$'\r'
chmod: cannot access '/etc/init.d/gwsocket'$'\r': No such file or directory
: not foundsetup.sh: 105: canSniffer_setup.sh:
Installing can_converter...
'can_converter.out' -> '/home/pi/projects/can_converter/bin/ARM/Debug/'$'\r'
cp: cannot create regular file '/home/pi/projects/can_converter/bin/ARM/Debug/'$'\r': No such file or directory
: not foundsetup.sh: 109: canSniffer_setup.sh:
Installing can_converter service script in /etc/init.d...
'can_converter' -> '/etc/init.d/'$'\r'
chmod: cannot access '/etc/init.d/can_converter'$'\r': No such file or directory
: not foundsetup.sh: 114: canSniffer_setup.sh:
Copying website and scripts to /var/www
'config.json' -> '/var/www/'$'\r'
cp: cannot create regular file '/var/www/'$'\r': No such file or directory
'sudowebscript.sh' -> '/var/www/'$'\r'
cp: cannot create regular file '/var/www/'$'\r': No such file or directory
chmod: cannot access '/var/www/sudowebscript.sh'$'\r': No such file or directory
'../db/db.sqlite' -> '/var/www/'$'\r'
cp: cannot create regular file '/var/www/'$'\r': No such file or directory
cp: cannot create directory '/var/www/'$'\r': No such file or directory
: not foundsetup.sh: 122: canSniffer_setup.sh:
chown: cannot access '/var/www/sudowebscript.sh'$'\r': No such file or directory
: not foundsetup.sh: 125: canSniffer_setup.sh:
: not foundsetup.sh: 129: canSniffer_setup.sh:
canSniffer successfully installed
Alles anzeigen
Gruß Kilian