Benutzer-Werkzeuge

Webseiten-Werkzeuge


raspberry:redsleeve_quick_install

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
raspberry:redsleeve_quick_install [2015/09/11 17:13] – [Packete nachinstallieren] gpipperrraspberry:redsleeve_quick_install [2015/09/11 17:20] (aktuell) – [Packete nachinstallieren] gpipperr
Zeile 1: Zeile 1:
 +=====Redsleeve Linux Betriebssystem 7.1  mit Python 3.4 für den Raspberry PI 2=====
  
 +Da Pidora noch nicht so recht den Pi 2 verfügbar ist, alternativ http://www.redsleeve.org/ installiert. 
 +
 +Für die Installation sieh auch die Original Anleitung unter https://wiki.redsleeve.org/index.php/Install_Rasperry_Pi
 +
 +Anmerkungen:
 +
 +  * Für das Schreiben der Image Datei diese zuvor mit http://www.7-zip.org auch als bin file entpacken!
 +  * Einrichten des Systems im weiteren gleich/ähnliche wie das Pidora Setup, siehe =>  [[raspberry:pidora_quick_install|Pidora als Linux  Betriebsystem für den Raspberry PI]]
 +
 +
 +===Root Filesystem vergrößern==
 +
 +<code bash>
 +
 +yum install e2fsprogs
 +
 +# Partition löschen und neue Partition mit einen Block höher als die alte Partition anlegen
 +
 +fdisk /dev/mmcblk0
 +
 +p
 +
 +        Device Boot      Start         End      Blocks   Id  System
 +/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
 +/dev/mmcblk0p2          122880     1945599      911360   83  Linux
 +
 +Command (m for help): d
 +Partition number (1,2, default 2): 2
 +Partition 2 is deleted
 +
 +Command (m for help): n
 +
 +Partition type:
 +     primary (1 primary, 0 extended, 3 free)
 +     extended
 +Select (default p): p
 +Partition number (2-4, default 2): 2
 +
 +First sector (2048-124735487, default 2048): 122880
 +Last sector, +sectors or +size{K,M,G} (122880-124735487, default 124735487):
 +
 +Command (m for help): w
 +The partition table has been altered!
 +#----
 +
 +reboot
 +
 +#---
 +
 +resize2fs /dev/mmcblk0p2
 +
 +#---
 +df -h
 +
 +</code>
 +
 +
 +=== Update ===
 +
 +Die Mirror Einträgen in der yum Konfiguration zeigen leider nicht auf ein existierenden Mirror File nach der Basis Installation des Images.
 +
 +
 +Auf folgende Repositories URL's angepasst:
 +
 +  * /etc/yum.repos.d/raspberry.repo
 +    * mirrorlist=<nowiki>http://ftp.redsleeve.org/pub/el7-devel/el7/raspberrypi/mirrors</nowiki>
 +
 +  * /etc/yum.repos.d/Redsleeve.repo
 +      * mirrorlist=<nowiki>http://www.mirrorservice.org/sites/ftp.redsleeve.org/pub/el7/packages/base/mirrors</nowiki>
 +      * mirrorlist=<nowiki>http://www.mirrorservice.org/sites/ftp.redsleeve.org/pub/el7/packages/updates/mirrors</nowiki>
 +
 +
 +
 +====Python 3====
 +
 +Python 3.4 steht als Packet (09.2015) noch nicht zur Verfügung.
 +
 +Daher muss das von den Sourcen aufgebaut und installiert werden.
 +
 +
 +===Vorbereitungen===
 +
 +Code bereitstellen und notwendige Libraries + gcc installieren:
 +
 +<code bash>
 +
 +#libs
 +yum install libffi bluez gdb valgrind gcc expat-devel
 +yum install zlib-devel bzip2-devel
 +
 +mkdir /srv/python3
 +
 +cd /srv/python3
 +
 +wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
 +
 +tar xfv Python-3.4.3.tar.xz
 +
 +cd Python-3.4.3
 +
 +</code>
 +
 +
 +=== Python 3 übersetzen ===
 +
 +<code bash>
 +
 +
 +export CXX="/usr/bin/g++"
 +
 +
 +./configure
 +
 +#bzw mit entsprechenden Parametern
 +
 +./configure --prefix=/usr       \
 +            --enable-shared     \
 +            --with-system-expat \
 +            --with-system-ffi   \
 +            --with-ensurepip    \
 +            LDFLAGS="-Wl,-rpath /usr/lib"
 +
 +#Übersetzen
 +make
 +
 +#Installieren
 +make install
 +
 +
 +#Rechte anpassen
 +chmod -v 755 /usr/lib/libpython3.4m.so
 +chmod -v 755 /usr/lib/libpython3.so
 +
 +</code>
 +
 +=== Alternatives für Python einrichten===
 +
 +Unter Linux sollten die verschienden Varianten einer Software mit "alternatives" umgeschaltet werden.
 +
 +<code bash>
 +
 +ls -la /usr/bin/python*
 +
 +alternatives --list
 +
 +alternatives --install /usr/bin/python python /usr/bin/python2.7 1
 +
 +alternatives --install /usr/bin/python python /usr/bin/python3.4 2
 +
 +#überpürfen
 +alternatives --display python
 +python - status is auto.
 + link currently points to /usr/bin/python3.4
 +/usr/bin/python2.7 - priority 1
 +/usr/bin/python3.4 - priority 2
 +
 +Current 'best' version is /usr/bin/python3.4.
 +
 +
 +#umschalten
 +alternatives --config python
 +
 +#test
 +python --version
 +
 +</code>
 +
 +=== Packete nachinstallieren ===
 +
 +==pip==
 +
 +      Download des Scripts „get-pip.py“ von https://pip.pypa.io/en/latest/installing.html#install-pip
 +      Script „get-pip.py“ zum Beispiel nach ~/ kopieren
 +      Script mit "python get-pip.py" aufrufen
 +
 +
 +Problem:
 +<code bash>
 +[root@localhost ~]# python get-pip.py
 +Traceback (most recent call last):
 +  File "get-pip.py", line 17759, in <module>
 +    main()
 +  File "get-pip.py", line 162, in main
 +    bootstrap(tmpdir=tmpdir)
 +  File "get-pip.py", line 82, in bootstrap
 +    import pip
 +zipimport.ZipImportError: can't decompress data; zlib not available
 +
 +</code>
 +
 +
 +
 +
 +
 +Zlib wurde beim obigen Bulid nicht sauber mit integriert, liegt wohl daran das die Libraries nicht dort liegen wo sie sollten ....
 +
 +Bin am suchen .... , erster Test mit weiteren Paramter "LDFLAGS="-Wl,-rpath /usr/lib"" sieht vorerst noch gut aus, übersetzt mal was.
 +
 +Prüfen wie  Python übersetzt wurde:
 +<code bash>
 +python -c "import sysconfig; print( sysconfig.get_config_var('CONFIG_ARGS') )"
 +'--prefix=/usr' '--enable-shared' '--with-system-expat' '--with-system-ffi' '--with-ensurepip' 'LDFLAGS=-Wl,-rpath /usr/lib'
 +</code>
 +
 +
 +Nächster Fehler:
 +<code bash>
 + python get-pip.py
 +
 +...
 +File "/tmp/tmpu65xb4ai/pip.zip/pip/_vendor/distlib/compat.py", line 66, in <module>
 +ImportError: cannot import name 'HTTPSHandler'
 +
 +</code>
 +
 +Hier fehlt wohl auch noch die SSL Unterstützung beim Übersetzen .....
 +
 +===Quellen===
 +
 +  * http://www.linuxfromscratch.org/blfs/view/svn/general/python3.html
raspberry/redsleeve_quick_install.txt · Zuletzt geändert: 2015/09/11 17:20 von gpipperr