I downloaded MySQL-python-1.2.1 from SourceForge and installed it on a
Mandrake system (Mandrake Linux 9.2 3.3.1-2mdk on linux2).
The installation was successful. The gcc version is 3.3.
My Python version is 2.4.2. When I import MySQLdb, I get an error
which says that __pure_virtual is an undefined symbol.
Look:
>>import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/python2.4/site-packages/MySQLdb/__init__.py", line
19, in ?
import _mysql
ImportError: /usr/local/python2.4/site-packages/_mysql.so: undefined
symbol: __pure_virtual
By the way, mysql (5.0.27-standard)is running OK on the Mandrake
system. Look:
[antonyliu@myhos t antonyliu]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 5.0.27-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
I have googled hard, and did see someone asking the same question, but
haven't found a good solution to this problem. Could anyone give me a
hint? Thanks a lot! 4 2101 an***********@y ahoo.com wrote:
I have googled hard, and did see someone asking the same question, but
haven't found a good solution to this problem. Could anyone give me a
hint? Thanks a lot!
googling for "undefined symbol: __pure_virtual" brings up hundreds of
posts on this topic, and the answer is *always* to make sure that you're
linking with a version of the C++ libraries that matches your compiler.
</F>
Fredrik Lundh wrote:
an***********@y ahoo.com wrote:
I have googled hard, and did see someone asking the same question, but
haven't found a good solution to this problem. Could anyone give me a
hint? Thanks a lot!
googling for "undefined symbol: __pure_virtual" brings up hundreds of
posts on this topic, and the answer is *always* to make sure that you're
linking with a version of the C++ libraries that matches your compiler.
</F>
Hi, thanks. I followed the strategy provided at the following url http://www.mail-archive.com/db******.../msg27851.html
by adding "-lmygcc" to the end of the librarys to link. I added it to
the end of this line in the mysql_config script like so:
libs=" $ldflags -L$pkglibdir -lmysqlclient -lz -lcrypt -lnsl -lm
-lmygcc "
And then I recompiled the MySQL-python-1.2.1 package, but the same
problem remains. an***********@y ahoo.com wrote:
Fredrik Lundh wrote:
an***********@y ahoo.com wrote:
I have googled hard, and did see someone asking the same question, but
haven't found a good solution to this problem. Could anyone give me a
hint? Thanks a lot!
googling for "undefined symbol: __pure_virtual" brings up hundreds of
posts on this topic, and the answer is *always* to make sure that you're
linking with a version of the C++ libraries that matches your compiler.
</F>
Hi, thanks. I followed the strategy provided at the following url
http://www.mail-archive.com/db******.../msg27851.html
by adding "-lmygcc" to the end of the librarys to link. I added it to
the end of this line in the mysql_config script like so:
libs=" $ldflags -L$pkglibdir -lmysqlclient -lz -lcrypt -lnsl -lm
-lmygcc "
And then I recompiled the MySQL-python-1.2.1 package, but the same
problem remains.
I tried using -lgcc as some people suggested in some forum, but it does
not resolve the problem. It looks like many people are having this
problem, but no solution has been offered so far. Anybody has a clue?
Thanks. an***********@y ahoo.com wrote:
I downloaded MySQL-python-1.2.1 from SourceForge and installed it on a
Mandrake system (Mandrake Linux 9.2 3.3.1-2mdk on linux2).
The installation was successful. The gcc version is 3.3.
My Python version is 2.4.2. When I import MySQLdb, I get an error
which says that __pure_virtual is an undefined symbol.
Look:
>>>import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/python2.4/site-packages/MySQLdb/__init__.py", line
19, in ?
import _mysql
ImportError: /usr/local/python2.4/site-packages/_mysql.so: undefined
symbol: __pure_virtual
By the way, mysql (5.0.27-standard)is running OK on the Mandrake
system. Look:
[antonyliu@myhos t antonyliu]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 5.0.27-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
I have googled hard, and did see someone asking the same question, but
haven't found a good solution to this problem. Could anyone give me a
hint? Thanks a lot!
Hi,
I can only say that it runs fine under Mandriva 2007 ... and that Mandriva
went to gcc V4 long after 9.2 ... maybe an issue here.
Regards,
hg This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andreas Jung |
last post by:
I am trying to embed Python within a C++ application (Linux, Python2.3.4).
I am using the example from the example from the "Embeding and Extending"
docs.
This works fine importing a simple module without any imports. However when
I add
an "import urllib" inside the Python script to be imported through my C++
application
then the import fails:
Traceback (most recent call last):
|
by: Stu |
last post by:
I am trying to build the xerces shared library with 2.3.0 version of
their source code on an AIX 5.1 32 bit machine with the following
version of the g++ compiler
/usr/local/bin/g++ -v
Reading specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/specs
Configured with: ../gcc-3.3.1/configure --disable-nls
Thread model: aix
gcc version 3.3.1
|
by: francescomoi |
last post by:
Hello.
Python 2.3.4 (#1, Feb 2 2005, 12:11:53)
on linux2
MySQL-python-1.2.0
I'm trying to execute this script:
----------------------
#!/usr/bin/python
import MySQLdb
|
by: thomas Armstrong |
last post by:
Hello.
Python 2.3.4 (#1, Feb 2 2005, 12:11:53)
on linux2
MySQL-python-1.2.0
I'm trying to execute this script:
----------------------
#!/usr/bin/python
import MySQLdb
|
by: yamitmehta |
last post by:
When I compile to code using g++arm of VxWorks 5.5 and put it on my
board i get the follwing undefined symbols:-
Cpool and Csingleton are template classes. CPool has the static member
variables:-ms_uCapacity ,ms_uAllocatedCount ,
ms_uLockCapacity ,ms_pmutex
-ld < yamit/apps1.out
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uCapacity
(binding 1 type 0)
Undefined symbol: _Q23m5tt5CPool1ZQ23m5t10CMarshaler$ms_uAllocatedCount
| |
by: grbgooglefan |
last post by:
I am importing cStringIO module in my PythonC++ embedded program.
The import is failing with the following error:
ImportError: /usr/lib/python2.3/lib-dynload/cStringIO.so: undefined
symbol: PyObject_SelfIter
I have python-2.3.3-88.9.x86 installed on my machine.
Why is this error coming? how can I resolve this undefined symbol?
Do I need to import anything before this?
|
by: Borse, Ganesh |
last post by:
Hi,
Can you please guide me for the following problem?
The call to "PyImport_ImportModule("cStringIO");" is failing with an error of "undefined symbol: PyObject_SelfIter".
Before importing this module, I am importing only the sys module.
Py_SetProgramName("/usr/bin/python");
Py_Initialize();
char* argv = { "python","-v",""};
PySys_SetArgv(2,argv);
|
by: martinnorth |
last post by:
Hi,
I am running Python and MySQL on Ubuntu and have installed MySQLdb. If I
try to import MySQLdb I get the following error:
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 16:42:08)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
|
by: Lawrence D'Oliveiro |
last post by:
In message <mailman.109.1216158151.922.python-list@python.org>, Cyril Bazin
wrote:
What's the error message? This should be in Apache's error_log file.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |