简体   繁体   中英

ConfigParser.NoSectionError: No section: 'metadata' in installing mysql-python

When I try install mysql-python to CentOs6.5 it casts a error

python /sw/ple.bkp/workspace/tianfd/TEMP/MySQL-python-1.2.5/setup.py install
 Traceback (most recent call last):
   File "/sw/ple.bkp/workspace/tianfd/TEMP/MySQL-python1.2.5/setup.py", line 17, in <module>metadata, options = get_config()
   File "/sw/ple.bkp/workspace/tianfd/TEMP/MySQL-python1.2.5/setup_posix.py", line 32, in get_config
metadata, options = get_metadata_and_options()
   File "/sw/ple.bkp/workspace/tianfd/TEMP/MySQL-python-1.2.5/setup_common.py", line 12, in get_metadata_and_options metadata = dict(config.items('metadata'))
   File "/usr/local/lib/python2.7/ConfigParser.py", line 642, in items
raise NoSectionError(section)
   ConfigParser.NoSectionError: No section: 'metadata'

I have tried to install mysql-devel and recompile Python, But the error doesn't fix. So,Could you give me some hints about this error?

Thank for your time!

This seems to be the case of ConfigParser not being able to read the metadata.cfg file. Try setting the right permissions to this file as well as site.cfg .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM