Install python-twisted

Want to develop an add-on for your ReadyNAS but don't know how to get started? This is the place to ask your questions.

Install python-twisted

Postby danielvegas » 23 Feb 2012, 16:13

Hi, this is a crosspost from http://www.readynas.com/forum/viewtopic.php?f=7&t=61414
WhoCares? asked me to post this here, too.

I try to install the twisted-engine on my ReadyNas Duo (Sparc). It's used to let an IRC-bot communicate with the network.
The package is available for Debian as "python-twisted": http://twistedmatrix.com/trac/wiki/Downloads

However, when I issue
Code: Select all
apt-get install python-twisted
I receive the following errors:

Code: Select all
ReadyNas:~# apt-get install python-twisted
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  python-twisted: Depends: python2.3-twisted but it is not going to be installed
  python2.6: Depends: libdb4.8 but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


I installed python 2.6.6 via "WhoCares?" add-on and that works nicely.

So to me it seems like he's trying to install a package called "libdb4.8", but can't. When I try to install it directly, I get the following error:
Code: Select all
ReadyNas:~# apt-get install libdb4.8
Reading Package Lists... Done
Building Dependency Tree... Done
Package libdb4.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libdb4.8 has no installation candidate


I googled this, but since I found nothing, I thought it might be a ReadyNas-specific problem?

Thank you guys for you help!
Daniel
danielvegas
ReadyNASXtras User
 
Posts: 7
Joined: 23 Feb 2012, 16:10
ReadyNAS1: Sparc

Advertisement

Re: Install python-twisted

Postby Xtras » 23 Feb 2012, 21:07

What's the output of
Code: Select all
dpkg -l | grep libdb

on your ReadyNAS?
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby danielvegas » 23 Feb 2012, 21:49

Code: Select all
ReadyNas:~# dpkg -l | grep libdb
ii  libdb1-compat                     2.1.3-7                     The Berkeley database routines [glibc 2.0/2.
ii  libdb2                            2:2.7.7.0-7                 The Berkeley database routines (run-time fil
ii  libdb3                            3.2.9-22                    Berkeley v3 Database Libraries [runtime]
ii  libdb4.2                          4.2.52-18                   Berkeley v4.2 Database Libraries [runtime]
ii  libdb4.2-dev                      4.2.52-18                   Berkeley v4.2 Database Libraries [developmen
ReadyNas:~#
danielvegas
ReadyNASXtras User
 
Posts: 7
Joined: 23 Feb 2012, 16:10
ReadyNAS1: Sparc

Re: Install python-twisted

Postby Xtras » 24 Feb 2012, 00:07

Ok, here you go. Pretty much untested since I had to compile most of it for you - except for the libdb4.8 ;) Be aware that although many of the files have a "_all" architecture flag they may not work on other platforms than Sparc.
Attachments
python-pkg-resources_0.6c8-4.rns1_all.deb
python-pkg-resources used for twisted
(59.77 KiB) Downloaded 55 times
python-crypto_2.1.0-2.rns1_sparc.deb
python-crypto for ReadyNAS Sparc
(392.98 KiB) Downloaded 43 times
python-zope.interface_3.5.3-1_sparc.deb
zope-interface (needed by core)
(114.96 KiB) Downloaded 40 times
python-twisted-words_11.1.0-1_all.deb
twisted-words (chat)
(215.5 KiB) Downloaded 41 times
python-twisted-web_11.1.0-1_all.deb
twisted-web (http)
(445.57 KiB) Downloaded 46 times
python-twisted-runner_11.1.0-1_sparc.deb
twisted-runner (scheduler)
(24.23 KiB) Downloaded 47 times
python-twisted-news_11.1.0-1_all.deb
twisted-names (nntp)
(28.45 KiB) Downloaded 38 times
python-twisted-names_11.1.0-1_all.deb
twisted-names (dns)
(75.16 KiB) Downloaded 38 times
python-twisted-mail_11.1.0-1_all.deb
twisted-mail (smtp, pop3, imap)
(193.4 KiB) Downloaded 56 times
python-twisted-lore_11.1.0-1_all.deb
twisted-lore (documentation generator)
(108.34 KiB) Downloaded 36 times
python-twisted-core_11.1.0-1_all.deb
twisted-core (well, the core ;))
(1.17 MiB) Downloaded 50 times
python-twisted-conch_11.1.0-1_all.deb
twisted-conch (SSH implementation)
(271.62 KiB) Downloaded 46 times
python-twisted-bin_11.1.0-1_sparc.deb
twisted-bin
(26.69 KiB) Downloaded 42 times
python-twisted_11.1.0-1_all.deb
python-twisted (main package, depends on all others)
(10.69 KiB) Downloaded 41 times
python-pyasn1_0.0.11a-1_all.deb
python-pyasn1 (needed for twisted-conch)
(31.19 KiB) Downloaded 41 times
libdb4.8_4.8.24-1~bpo40+1_sparc.deb
libdb4.8 Package
(592.47 KiB) Downloaded 55 times
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby danielvegas » 24 Feb 2012, 14:27

Wohoo. Thank you so much!

I'll try it out later this weekend.
danielvegas
ReadyNASXtras User
 
Posts: 7
Joined: 23 Feb 2012, 16:10
ReadyNAS1: Sparc

Re: Install python-twisted

Postby danielvegas » 25 Feb 2012, 06:50

Okay, so I installed the packages in the following order:
libdb4.8_4.8.24-1~bpo40+1_sparc.deb
python-pkg-resources_0.6.14-4_all.deb
python-zope.interface_3.5.3-1_sparc.deb
python-twisted-core_11.1.0-1_all.deb
python-twisted-words_11.1.0-1_all.deb
python-twisted-web_11.1.0-1_all.deb
python-twisted-runner_11.1.0-1_sparc.deb
python-twisted-news_11.1.0-1_all.deb
python-twisted-names_11.1.0-1_all.deb
python-twisted-mail_11.1.0-1_all.deb
python-twisted-lore_11.1.0-1_all.deb
python-pyasn1_0.0.11a-1_all.deb
python-twisted-bin_11.1.0-1_sparc.deb

Twisted works fine now. Again, thank you so much for your help with this!

However, I ran into an issue with sqlite3:
Code: Select all
2012-02-25 06:48:12+0100 [-]   File "/usr/lib/python2.6/dist-packages/twisted/enterprise/adbapi.py", line 203, in __init__
2012-02-25 06:48:12+0100 [-]     self.dbapi = reflect.namedModule(dbapiName)
2012-02-25 06:48:12+0100 [-]   File "/usr/lib/python2.6/dist-packages/twisted/python/reflect.py", line 339, in namedModule
2012-02-25 06:48:12+0100 [-]     topLevel = __import__(name)
2012-02-25 06:48:12+0100 [-]   File "/usr/lib/python2.6/sqlite3/__init__.py", line 24, in <module>
2012-02-25 06:48:12+0100 [-]     from dbapi2 import *
2012-02-25 06:48:12+0100 [-]   File "/usr/lib/python2.6/sqlite3/dbapi2.py", line 27, in <module>
2012-02-25 06:48:12+0100 [-]     from _sqlite3 import *
2012-02-25 06:48:12+0100 [-] ImportError: /usr/lib/python2.6/lib-dynload/_sqlite3.so: undefined symbol: sqlite3_set_authorizer


I tried installing the sqlite3-package from http://archive.debian.net/sarge-backpor ... 3/download
However, it doesn't change much unfortunately.

Does anybody know how to set this "sqlite3_set_authorizer"?
danielvegas
ReadyNASXtras User
 
Posts: 7
Joined: 23 Feb 2012, 16:10
ReadyNAS1: Sparc

Re: Install python-twisted

Postby Xtras » 25 Feb 2012, 13:54

This is a problem with the way the SQlite3 library is compiled for the ReadyNAS. To fix this one would need to rebuild the libsqlite3.so from source and enable the set_authorizer function there. I believe we did that once on x86 while looking into porting Calibre, not sure about Sparc. Try the GPL source provided by Netgear and look for the SET_AUTHORIZER compile time flag, it will take me a bit to check our Sparc sources.
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby danielvegas » 27 Feb 2012, 16:00

Okay, I'm on Radiator 4.1.8 now. The whole twisted-thing still doesn't seem do work out. I could install all the packages except the python-twisted-conch and therefore not the main python-twisted-package, either.
Conch depends on python-crypto, which depends on libc6 and libgmp3c2. This on the other hand conflicts with the already installed libgmp3, which seems to be required by php5-gmp.

Code: Select all
readynas:~# dpkg -i python-twisted-conch_11.1.0-1_all.deb
(Reading database ...
16219 files and directories currently installed.)
Preparing to replace python-twisted-conch 1:11.1.0-1 (using python-twisted-conch_11.1.0-1_all.deb) ...
Unpacking replacement python-twisted-conch ...
dpkg: dependency problems prevent configuration of python-twisted-conch:
 python-twisted-conch depends on python-crypto (>= 2.0.1+dfsg1-1.1); however:
  Package python-crypto is not configured yet.
dpkg: error processing python-twisted-conch (--install):
 dependency problems - leaving unconfigured
Processing triggers for python-twisted-core ...
Errors were encountered while processing:
 python-twisted-conch


Code: Select all
readynas:~# dpkg -i python-crypto_2.1.0-2_sparc.deb
(Reading database ...
16219 files and directories currently installed.)
Preparing to replace python-crypto 2.1.0-2 (using python-crypto_2.1.0-2_sparc.deb) ...
Unpacking replacement python-crypto ...
dpkg: dependency problems prevent configuration of python-crypto:
 python-crypto depends on libc6 (>= 2.6); however:
  Version of libc6 on system is 2.3.2.ds1-22sarge6.infrant1.
 python-crypto depends on libgmp3c2; however:
  Package libgmp3c2 is not installed.
dpkg: error processing python-crypto (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-crypto


Code: Select all
readynas:~# dpkg -i libgmp3c2_4.3.2+dfsg-1_sparc.deb
dpkg: considering removing libgmp3 in favour of libgmp3c2 ...
dpkg: no, cannot proceed with removal of libgmp3 (--auto-deconfigure will help):
 php5-gmp depends on libgmp3
  libgmp3 is to be removed.
dpkg: regarding libgmp3c2_4.3.2+dfsg-1_sparc.deb containing libgmp3c2:
 libgmp3c2 conflicts with libgmp3
  libgmp3 (version 4.1.4-6) is present and installed.
dpkg: error processing libgmp3c2_4.3.2+dfsg-1_sparc.deb (--install):
 conflicting packages - not installing libgmp3c2
Errors were encountered while processing:
 libgmp3c2_4.3.2+dfsg-1_sparc.deb


Is there any way to resolve this or should I rather put my twisted-plans to rest?
danielvegas
ReadyNASXtras User
 
Posts: 7
Joined: 23 Feb 2012, 16:10
ReadyNAS1: Sparc

Re: Install python-twisted

Postby Xtras » 01 Mar 2012, 03:00

I'll look into that. The libgmp3c2 shouldn't be there in the first place - must be a leftover from another test I overlooked when building. Sorry.
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby Xtras » 01 Mar 2012, 03:03

Umm, where did you get the python-crypto from? That's not the version you should be using. I'll attach a working one to the first post.
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby Xtras » 01 Mar 2012, 03:04

Just checked, the libgmp3c2 isn't on my build system so where did you get that one from?
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby Xtras » 01 Mar 2012, 03:08

Ok, I just added the python-crypto package I used to build twisted. Should work for you, too, and doesn't require libgmp3c2 but uses the one on the ReadyNAS instead.
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby danielvegas » 01 Mar 2012, 09:31

Thanks, I'll try that tonight, since I don't have remote-ssh-access to the NAS from here.

I needed another package called python-pkg-resources earlier, because python-zope depended on it. I got that from the squeeze-repository and it worked flawlessly (as far as I can tell): http://packages.debian.org/squeeze/python-pkg-resources
So I thought I could give python-crypto a shot, too.

I got the python-crypto-pacakge from http://packages.debian.org/squeeze/python-crypto
The libgmp3c2 at http://packages.debian.org/squeeze/libgmp3c2 failed during the installation.

It's not like I'd really know what I'm doing here.. :)
danielvegas
ReadyNASXtras User
 
Posts: 7
Joined: 23 Feb 2012, 16:10
ReadyNAS1: Sparc

Re: Install python-twisted

Postby Xtras » 01 Mar 2012, 13:08

Generally you may be able to use packages from the Squeeze repository as long as they are Python-only. But when a package depends on external libraries or has to be compiled from C source code, chances are you better not use it but ask here instead.
User avatar
Xtras
Site Admin
 
Posts: 313
Joined: 30 Jul 2011, 17:55
ReadyNAS1: x86
ReadyNAS2: ARM
ReadyNAS3: Sparc

Re: Install python-twisted

Postby danielvegas » 01 Mar 2012, 18:19

You are my python-twisted-hero! Everything works fine now.
For future reference:
Code: Select all
01. libdb4.8_4.8.24-1~bpo40+1_sparc.deb
02. python-pkg-resources_0.6.14-4_all.deb
03. python-zope.interface_3.5.3-1_sparc.deb
04. python-twisted-bin_11.1.0-1_sparc.deb
05. python-twisted-core_11.1.0-1_all.deb
06. python-twisted-words_11.1.0-1_all.deb
07. python-twisted-web_11.1.0-1_all.deb
08. python-twisted-runner_11.1.0-1_sparc.deb
09. python-twisted-news_11.1.0-1_all.deb
10. python-twisted-names_11.1.0-1_all.deb
11. python-twisted-mail_11.1.0-1_all.deb
12. python-twisted-lore_11.1.0-1_all.deb
13. python-pyasn1_0.0.11a-1_all.deb
14. python-crypto_2.1.0-2.rns1_sparc.deb
15. python-twisted-conch_11.1.0-1_all.deb
16. python-twisted_11.1.0-1_all.deb


Thanks a lot for your help!
danielvegas
ReadyNASXtras User
 
Posts: 7
Joined: 23 Feb 2012, 16:10
ReadyNAS1: Sparc

Next

Return to Developers Corner

Who is online

Users browsing this forum: No registered users and 0 guests

  • Advertisement
cron