Chinaunix首页 | 论坛 | 博客
  • 博客访问: 190026
  • 博文数量: 31
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 981
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-20 09:18
文章分类
文章存档

2011年(3)

2010年(8)

2009年(1)

2008年(19)

我的朋友

分类: Python/Ruby

2010-01-04 17:19:37

Got the following msg while trying to build python2.6 on Debian (It drives me crazy that Debian still doesn’t provide python2.6, though python3.0 has long been available):

Failed to find the necessary bits to build these modules:

_bsddb             _hashlib           _sqlite3
_ssl               _tkinter           bsddb185
bz2                dbm                gdbm
sunaudiodev        zlib

To find the necessary bits, look in setup.py in detect_modules() for the module's name.



Googled it and seems we can just ignore it. So I typed “make install”. Yes, it worked for now. But we are still using python2.5 by just type “python -V” because the default installation place for python2.6 is “/usr/local/” not “/usr”, so we need type “sudo ln -f /usr/local/bin/python /usr/bin/python” to make “/usr/bin/python” hard-linked to python2.6

The first time I have to down-grade a package, from libstdc++6 to libstdc++5. This command “sudo aptitude install libstdc++5” doesn’t work:

 

Setting up python-pkg-resources (0.6c8-4) ...

Traceback (most recent call last):

  File "/usr/bin/pycentral", line 1891, in

    main()

  File "/usr/bin/pycentral", line 1885, in main

    rv = action.run(global_options)

  File "/usr/bin/pycentral", line 1239, in run

    runtimes = get_installed_runtimes()

  File "/usr/bin/pycentral", line 210, in get_installed_runtimes

    default_version = pyversions.default_version(version_only=True)

  File "/usr/share/pycentral-data/pyversions.py", line 163, in default_version

    raise ValueError, "/usr/bin/python does not match the python default version. It must be reset to point to %s" % debian_default

ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.5

 
Apparently Debian doesn’t support python2.6 by default. What if I manually “sudo vim /usr/share/python/debian_defaults” and change the default-version? It works!
阅读(1658) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~