Month: April 2015

How to install an old Debian version in the VirtualBox

1) Download the Debian netinstall CDs

2) Create a new machine in the VirtualBox select Debian 32 or 64 bits (needs to be same arch of downloaded netinstall CD). Select about 512MB of RAM or more and 8GB Hard disc or more.

3) Edit the machine Settings. In the Storage click in the Empty disk under “Controller IDE” and then click in the CD Disk more at right side of screen and click on “Choose CD/DVD virtual disk” and point it to .iso netinstall CD.

4) Click in the “Controller: IDE” and then click “Add Hard Disk” and select the Debian.vdi disk image that was created when you create the Debian Image. This same file is also at “Controller: SATA”, but older Debian images (Woody, Sarge) will not detect the SATA then you can remove the Debian.vdi from SATA.

Now just start the Debian image and it will show the Debian boot image. After conclude the installation you need to enter the Archive debian repositories:

deb http://archive.debian.org/debian-security/ <version>/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ <version>/updates main non-free contrib

Remember to replace “<version>” by “woody”, or “sarge”, etc.

error: undefined reference to `get_crc_table’

I was facing these errors:

: undefined reference to `get_crc_table'
: undefined reference to `inflate'
: undefined reference to `crc32'
: undefined reference to `deflate'
: undefined reference to `deflateInit2_'
: undefined reference to `inflateEnd'
: undefined reference to `deflateEnd'
: undefined reference to `inflateInit2_'

I just fixed it adding “-lz” to end of gcc command line.

NameError: global name ‘base’ is not defined

I was facing this error:

$ python Spectrogram.py 
Traceback (most recent call last):
  File "Spectrogram.py", line 22, in 
    devices = SerialPortDevice.enumerate_devices()
  File "/comum/workspace/adafruit_guide_fft-master/SerialPortDevice.py", line 68, in enumerate_devices
    return [SerialPortDevice(port[0], port[1]) for port in serial.tools.list_ports.comports() if port[2] != 'n/a']
  File "/usr/lib/python2.7/dist-packages/serial/tools/list_ports_posix.py", line 122, in comports
    return [(d, describe(d), hwinfo(d)) for d in devices]
  File "/usr/lib/python2.7/dist-packages/serial/tools/list_ports_posix.py", line 93, in describe
    return usb_lsusb_string(sys_usb)
  File "/usr/lib/python2.7/dist-packages/serial/tools/list_ports_posix.py", line 80, in usb_lsusb_string
    return base
NameError: global name 'base' is not defined

Then I found this “pyserial_patch.diff” patch:
http://sourceforge.net/p/pyserial/patches/26/

After editing the list_ports_posix.py the error message disappeared:

$ sudo vi /usr/lib/python2.7/dist-packages/serial/tools/list_ports_posix.py