Portál AbcLinuxu, 4. prosince 2025 10:23
$ ipkg.sh updateNainstaloval Python
$ ipkg.sh install pythonale skončil jsem na instalaci PyUSB.
$ python setup.py install -sh: python: not foundPřitom je Python nainstalovaný v /opt/bin/python2.5 i /opt/bin/python.
$ /opt/bin/python setup.py install -sh: /opt/bin/python: not found
$ ls /opt/bin/ bzcat captoinfo infocmp ncursesw5-config python reset sqlite3 tset bzip2 clear infotocap openssl python-config rnano tic update-alternatives bzip2-bzip2 idle ipkg pydoc python2.5 smtpd.py toe bzip2recover idle2.5 nano pydoc2.5 python2.5-config smtpd2.5.py tput
ls -l /opt/bin/python2.5 ? Co mount? Co file /opt/bin/python2.5? Možná není binárka pythonu spustitelná, nebo není python zkompilovaný pro správnou architekturu...
$ ls -l /opt/bin/python2.5 -rwxr-xr-x 1 admin root 6120 Jun 19 20:19 /opt/bin/python2.5
$ mount /dev/root on / type squashfs (ro) none on /dev type devfs (rw) proc on /proc type proc (rw) ramfs on /tmp type ramfs (rw) usbfs on /proc/bus/usb type usbfs (rw) /dev/discs/disc0/part5 on /tmp/mnt/disc0_5 type ext3 (rw,noatime) /dev/discs/disc0/part5 on /opt type ext3 (rw,noatime)
$ file /opt/bin/python2.5 -sh: file: not found
$ ipkg list_installed bzip2 - 1.0.5-2 - ipkg - 0.99.149-2 - lightweight package management system libdb - 4.2.52-3 - Berkeley DB Libraries nano - 2.0.6-1 - A pico like editor ncurses - 5.6-1 - NCurses libraries ncursesw - 5.7-1 - openssl - 0.9.7m-5 - python - 2.5-1 - python25 - 2.5.5-2 - readline - 6.1-2 - sqlite - 3.6.23.1-1 - zlib - 1.2.5-1 -
$ ipkg info python Package: python Version: 2.5-1 Status: install ok installed Architecture: mipsel Package: python Version: 2.4.4-3 Depends: python24 Status: unknown ok not-installed Section: devel Architecture: mipsel maintainer: NSLU2 Linux nslu2-linux@yahoogroups.com MD5Sum: e31b010053c554ecf97276e8df4981f3 Size: 793 Filename: python_2.4.4-3_mipsel.ipk Source: / Description: This is a package that sets up the default python. Successfully terminated.
file říká jen, že program file nainstalovaný nemáš. Ale koukám, že to máš na externím disku, takže se můžeš podívat přes file ve stolním Linuxu.
$ file python python: symbolic link to `python2.5'
$ file python2.5 python2.5: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), stripped
$ file nano nano: ELF 32-bit LSB executable, MIPS, MIPS-I version 1 (SYSV), dynamically linked (uses shared libs), strippedTakže to vypadá že je problém v tom: MIPS32. Je to tak?
src wl500g http://wl500g.dyndns.org/ipkg src arklinux http://ftp.arklinux.org/pub/nslu2/feeds/unslung/wl500g/ dest root /Ten předdefinovaný zdroj má vadné balíčky a momentálně tam nejde ani žádný balíček stáhnout, píše to: 404 Not Found
$ python TestWeatherStation.py
Traceback (most recent call last):
File "TestWeatherStation.py", line 82, in ?
sys.exit(main())
File "TestWeatherStation.py", line 50, in main
ws = WeatherStation.weather_station()
File "/opt/pywws-10.06_r222/WeatherStation.py", line 181, in __init__
dev = findDevice(0x1941, 0x8021)
File "/opt/pywws-10.06_r222/WeatherStation.py", line 170, in findDevice
for bus in usb.busses():
File "/opt/local/lib/python2.4/site-packages/usb/legacy.py", line 326, in busses
return (Bus(),)
File "/opt/local/lib/python2.4/site-packages/usb/legacy.py", line 322, in __init__
self.devices = [Device(d) for d in core.find(find_all=True)]
File "/opt/local/lib/python2.4/site-packages/usb/core.py", line 809, in find
import usb.backend.libusb10 as libusb10
File "/opt/local/lib/python2.4/site-packages/usb/backend/libusb10.py", line 29, in ?
from ctypes import *
ImportError: No module named ctypes
Vypadá to že budu muset ještě doinstalovat modul ctypes
$ python setup.py install running install running build running build_py running build_ext Configuring static FFI library: cd build/temp.linux-mips-2.4/libffi && env CFLAGS='' '/opt/ctypes-1.0.2/source/libffi/configure' checking build system type... Warning: creating insecure temp directory mkdir: Cannot create directory `/tmp/cg-1197': File exists config.guess: cannot create a temporary directory in /tmp configure: error: cannot guess build type; you must specify one Failedasi se na to .....
A dále to vypadá že ctypes nenainstalujiA není to náhodou pravda? Že by zbyl nějaký zmatek v
mkdir: Cannot create directory `/tmp/cg-1197': File exists
/tmp ?
checking build system type... Warning: creating insecure temp directory mkdir: Cannot create directory `/tmp/cg-1596': File exists config.guess: cannot create a temporary directory in /tmp configure: error: cannot guess build type; you must specify one Failed
source/libffi. Můžeš ji zkusit zkompilovat zvlášť.
(BTW mám 500gP verzi jedna, ale nedávno chcípla. Takže vlastně měl jsem. Vlastně to vůbec nebyl tak dobrý kus HW, jak by za ty peníze měl být, již od začátku trochu probíjel buď na USB nebo (po přepólování vidlice) na anténu. Tak ani nevím, jestli mám zkoušet v2. Asi ne.)
/opt/bin/python v PATH? Nebo je možné udělat symlink třeba z /usr/bin/python...
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.