Reply
Thread Tools
Posts: 2 | Thanked: 0 times | Joined on Mar 2009
#1
Hi,

I am trying to create an application in Python which will allow me to interface with a remote MySQL database. I tried to install MySQLdb on the N810 but it apparently does not work.

Does anyone have any ideas on this? Any help would be greatly appreciated!

Thanks!!
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#2
Welcome to this forum!

"Does not work" is unfortunately not a good explanation.
What does not work, and what does "does not work" look like?

Last edited by pycage; 2009-03-19 at 07:31.
 
Posts: 2 | Thanked: 0 times | Joined on Mar 2009
#3
sorry for the unclear explanation...

these are the steps i took:
1. i downloaded "MySQL-python-1.2.2.tar.gz" from http://sourceforge.net/project/showf...ckage_id=15775
2. extracted it using the command "tar xzvf MySQL-python-1.2.2.tar.gz"
3. cd into the folder using the command "cd MySQL-python-1.2.2"
4. build it using the command "python setup.py build"

at this point i get the following error message:

~/apps/MySQL-python-1.2.2 $ python setup.py build
sh: mysql_config: not found
Traceback (most recent call last):
File "setup.py", line 16, in <module>
metadata, options = get_config()
File "/home/user/apps/MySQL-python-1.2.2/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/home/user/apps/MySQL-python-1.2.2/setup_posix.py", line 24, in mysql_config
raise EnvironmentError, "%s not found" % mysql_config.path
EnvironmentError: mysql_config not found
~/apps/MySQL-python-1.2.2 $
I hope that is clear enough...thanks
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#4
This looks like you'd need a mysql-devel package on your system. I think the best would be to get the Scratchbox Maemo SDK installed on your computer, and build the mysql-python-bindings there. You should be able to compile and install the mysql-client source on Scratchbox, which in turn will help with compiling the mysql-python-bindings. Scratchbox can do crosscompiling for ARM, so it will run on your tablet.
 

The Following User Says Thank You to pycage For This Useful Post:
Posts: 8 | Thanked: 2 times | Joined on Feb 2008
#5
Originally Posted by pycage View Post
This looks like you'd need a mysql-devel package on your system. I think the best would be to get the Scratchbox Maemo SDK installed on your computer, and build the mysql-python-bindings there. You should be able to compile and install the mysql-client source on Scratchbox, which in turn will help with compiling the mysql-python-bindings. Scratchbox can do crosscompiling for ARM, so it will run on your tablet.
Ok, I'm in the same situation as the guy at the top of this thread. I need a working python-mysql package. I have installed the SDK, works fine when it's about compiling the hello world, but I am not able to compile the python-mysql module.

I would be very grateful if you, or somebody could help me.

Here is what I did, maybe I have misunderstood something, so please tell me, where I went wrong:

1. selected the ARMEL target.
2. downloaded http://sourceforge.net/projects/mysq...ar.gz/download
3. tried to compile it with python2.5 setup.py install, it needed setuptools
4. added the repos from the list on my N810 to the scratchbox environment:

Code:
[sbox-DIABLO_ARMEL: ~] > cat /etc/apt/sources.list
deb http://repository.maemo.org/ diablo/sdk free non-free
deb-src http://repository.maemo.org/ diablo/sdk free
deb http://repository.maemo.org/ diablo/tools free non-free
deb-src http://repository.maemo.org/ diablo/tools free

deb http://catalogue.tableteer.nokia.com/certified/ diablo user                                                         
deb http://catalogue.tableteer.nokia.com/non-certified/ diablo user                                                     
deb http://catalogue.tableteer.nokia.com/updates/diablo-2/ ./                                                          
deb http://repository.maemo.org/extras/ diablo free non-free                                                            
deb http://deb.opera.com/maemo diablo non-free                                                                          
deb http://www.web-brewer.co.uk/maemo.repository diablo os2008
5. fakeroot apt-get update
6. fakeroot apt-get install python2.5-setuptools
7. tried again, it look that setuptools works, but then it needs mysql_config. I read that I need the libmysqlclient-dev package, but I can't find it anywhere.

Any suggestions? Where can I go now?
 
Posts: 8 | Thanked: 2 times | Joined on Feb 2008
#6
A quick update: there is a package in the repos named 'mysql'. I can install it, but then if I try to compile mysql-python, I get the following output:

Code:
[sbox-DIABLO_ARMEL: ~/MySQL-python-1.2.3] > python2.5 setup.py install
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
running install
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
sem_post: Function not implemented
qemu: uncaught target signal 11 (Segmentation fault) - exiting
I've tried it several times, the segfault comes at random point.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:39.