rdiff-backup Error (ImportError: File not found)

ERROR : rdiff-backup Error (ImportError: File not found)
 for description about this error see below  : Error with rdiff-backup (click here)

I’m experiencing this error using rdiff-backup (v.1.2.8-1 installed with opkg) on my Buffalo WZR-HP-AG300H with openwrt. I bought the router Buffalo WZR-HP-AG300H (which is a Wireless Router Access Point) but before to talk about rdiff-backup and related error … just few (unrelated) notes about this router :

  • I’m not happy about dd-wrt which is on-board to this model (so consider to install openwrt)
  • CPU Atheros AR7161 is yes a MIPS  but BigEndian so you have to consider this for the pkgs (  pkges for MIPS LittleEndian don’t work)

Btw you can very easily replace dd-wrt with openwrt http://wiki.openwrt.org/toh/buffalo/wzr-hp-ag300h .
After installed openwrt core you can install Luci the WEBUI for router configuration http://wiki.openwrt.org/doc/howto/luci.essentials .

Error with rdiff-backup

( http://www.nongnu.org/rdiff-backup )
If you are hitting this error :

File "/usr/bin/rdiff-backup", line 20, in <module>
import rdiff_backup.Main
File "/usr/lib/python2.6/site-packages/rdiff_backup/Main.py", line 25, in <module>
import Globals, Time, SetConnections, selection, robust, rpath,
File "/usr/lib/python2.6/site-packages/rdiff_backup/SetConnections.py", line 30, in <module>
import Globals, connection, rpath
File "/usr/lib/python2.6/site-packages/rdiff_backup/connection.py", line 539, in <module>
import Globals, Time, Rdiff, Hardlink, FilenameMapping, C, Security,
File "/usr/lib/python2.6/site-packages/rdiff_backup/Rdiff.py", line 22, in <module>
import os, librsync
File "/usr/lib/python2.6/site-packages/rdiff_backup/librsync.py", line 28, in <module>
import _librsync
Import Error: File not found 

 The issue could be worked out *installing* the pkg : libbz2
 (description : bzip2 is a freely available, patent free, high-quality …)
In my case the issue was due to this library (also if last message was import _librsync )

How was worked out the issue

The following notes are valid in my case : sure  is not a fix for all cases.
Despite messages when you run rdiff-backup (last two lines of stack trace) :

...
File "/usr/lib/python2.6/site-packages/rdiff_backup/librsync.py", line 28, in <module>
import _librsync
Import Error: File not found 

The error isn’t related to _librsync (which is however present in my case).
I should have  to use ldd … but in my case ldd was in error (segmentation fault) so I used strace.
In order to drill down the issue I used strace.

strace /usr/bin/python -v /usr/bin/rdiff-backup

Output of strace :

....
 open("/usr/lib/python2.6/site-packages/rdiff_backup/_librsync.so", O_RDONLY) = 9
  NOTE : ok Library _librsync.so is found and open.
 fstat(9, {st_mode=S_IFREG|0755, st_size=9148, ...}) = 0
 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2b028000
 read(9, "177ELF1213101n320004"..., 4096) = 4096
 old_mmap(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b403000
 old_mmap(0x2b403000, 7672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 9, 0) = 0x2b403000
 old_mmap(0x2b415000, 956, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 9, 0x2000) = 0x2b415000
 close(9)                                = 0
  NOTE : ok Library _librsync.so is close.
 munmap(0x2b028000, 4096)                = 0
 open("/lib/librsync.so.1", O_RDONLY)    = -1 ENOENT (No such file or directory)
 open("/usr/lib/librsync.so.1", O_RDONLY) = 9
  NOTE : ok Library
 fstat(9, {st_mode=S_IFREG|0755, st_size=40712, ...}) = 0
 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2b028000
 read(9, "177ELF121310130260004"..., 4096) = 4096
 old_mmap(NULL, 106496, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b416000
 old_mmap(0x2b416000, 40036, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 9, 0) = 0x2b416000
 old_mmap(0x2b42f000, 3848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 9, 0x9000) = 0x2b42f000
 close(9)                                = 0
  ... missed some messages ...
 open("/lib/libbz2.so.1.0", O_RDONLY)    = -1 ENOENT (No such file or directory)
 open("/usr/lib/libbz2.so.1.0", O_RDONLY) = -1 ENOENT (No such file or directory)
  NOTE : ERROR : libbz2.so.1.0 not found
  ... missed some messages ...

From last error the missed library is libbz2

Powered by WP Review

Posts