Archive for gentoo

记下两个开源的国内镜像(163和sohu)。

http://mirrors.163.com/
http://mirrors.sohu.com/

ubuntu 10.04 源(网易):

deb http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted

No comment »

gentoo 下安装 scim-python 。使用 layman gentoo-china 源. 并提供解决[Errno 2] No such file or directory: ‘/usr/local/portage/layman/make.conf’ in /etc/make.conf 或 emerge: there are no ebuilds to satisfy “scim-python”. 错误的方法。

scim-python 是一个输入法,网上介绍还不错。

安装方法如下:

安装 layman 并使用 gentoo-china 源。

emerge layman
layman -f -a gentoo-china
echo “PORTDIR_OVERLAY=\”/usr/portage/local/layman/gentoo-china/\”” >> /usr/local/portage/layman/make.conf

解除 scim-python 的屏蔽并安装。

echo “app-i18n/scim-python ~x86” >> /etc/portage/package.keywords
echo “app-i18n/scim-python pinyin” >> /etc/portage/package.use
emerge scim-python

现在就已经安装完成了。如果你没有按照上面的方法安装出现了错误,下面是一些错误的解决办法。

如果没有执行

echo “PORTDIR_OVERLAY=\”/usr/portage/local/layman/gentoo-china/\”” >> /usr/local/portage/layman/make.conf

则会造成

[Errno 2] No such file or directory: ‘/usr/local/portage/layman/make.conf’ in /etc/make.conf

错误。

在emerge scim-python 时提示

# emerge scim-python
Calculating dependencies –
emerge: there are no ebuilds to satisfy “scim-python”.

这是因为没有安装 layman 或启用 gentoo-china 源。
请检查是不是没有安装了 layman 、没有执行 layman -f -a gentoo-china
检查 /etc/make.conf 文件里面是否存在下列内容

source /usr/local/portage/layman/make.conf

/usr/local/portage/layman/make.conf 文件里面是否有下列内容

PORTDIR_OVERLAY=”/usr/portage/local/layman/gentoo-china/”

No comment »

gentoo python 下使用 python3 出现 ImportError: No module named _sqlite3 错误的解决办法。

默认 gentoo 下 python 不能使用 sqlite3,会出现 ImportError: No module named _sqlite3 错误。
解决办法是增加 sqlite USE 标志并重新编译 python 。虽然有 sqlite3 这个use标志,但是 python 不能识别。建议只为python增加sqlite标志。执行
# echo “dev-lang/python sqlite” >> /etc/portage/package.use
就可以增加use标志。

gamexg@GGentoo ~ $ python
Python 2.5.2 (r252:60911, Oct 31 2008, 10:01:00)
[GCC 4.1.2 (Gentoo 4.1.2 p1.1)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import sqlite3
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python2.5/sqlite3/__init__.py”, line 24, in
from dbapi2 import *
File “/usr/lib/python2.5/sqlite3/dbapi2.py”, line 27, in
from _sqlite3 import *
ImportError: No module named _sqlite3

Comments (1) »

Gentoo 下的 gnome 图像查看器不能打开 jpg 和 jpeg 图片的问题。

默认情况下 gentoo 下的 gnome 图像查看器不能打开 jpg 和 jpeg 图像。

需要为 USE 增加 jpeg 值。建议直接加到 make.conf 里面去,因为这不是一个程序会受这个问题影响。

Comments (1) »

gentoo 下 intel 845G(其它的也一样) 显卡开启3D加速。

1 配置内核
Device Drivers —> Graphics support 的配置
│ │ -*- /dev/agpgart (AGP Support) —> │ │
│ │ (*) Direct Rendering Manager (XFree86 4.1.0 and higher DRI suppor│ │
│ │ () Lowlevel video output switch controls │ │
│ │ (*) Support for frame buffer devices —> │ │
│ │ [ ] Backlight & LCD device support —> │ │
│ │ Display device support —> │ │
│ │ Console display driver support —> │ │
│ │ [ ] Bootup logo —> │ │

/dev/agpgart (AGP Support) 的配置
│ │ — /dev/agpgart (AGP Support) │ │
│ │ () ALI chipset support │ │
│ │ () ATI chipset support │ │
│ │ () AMD Irongate, 761, and 762 chipset support │ │
│ │ () AMD Opteron/Athlon64 on-CPU GART support │ │
│ │ -*- Intel 440LX/BX/GX, I8xx and E7x05 chipset support │ │
│ │ () NVIDIA nForce/nForce2 chipset support │ │
│ │ () SiS chipset support │ │
│ │ () Serverworks LE/HE chipset support │ │
│ │ () VIA chipset support │ │
│ │ () Transmeta Efficeon support │ │

Direct Rendering Manager (XFree86 4.1.0 and higher DRI suppor 的配置
│ │ — Direct Rendering Manager (XFree86 4.1.0 and higher DRI suppor│ │
│ │ () 3dfx Banshee/Voodoo3+ │ │
│ │ () ATI Rage 128 │ │
│ │ () ATI Radeon │ │
│ │ () Intel I810 │ │
│ │ (*) Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver) —> │ │
│ │ () Matrox g200/g400 │ │
│ │ () SiS video cards │ │
│ │ () Via unichrome video cards │ │
│ │ () Savage video cards │ │

Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver) 的配置
│ │ ( ) i830 driver │ │
│ │ (X) i915 driver │ │

│ │ — Support for frame buffer devices │ │
│ │ [*] Enable firmware EDID │ │
│ │ -*- Enable Video Mode Handling Helpers │ │
│ │ [ ] Enable Tile Blitting Support │ │
│ │ *** Frame buffer hardware drivers *** │ │
│ │ () Cirrus Logic support │ │
│ │ () Permedia2 support │ │
│ │ () CyberPro 2000/2010/5000 support │ │
│ │ () Arc Monochrome LCD board support │ │
│ │ [ ] Asiliant (Chips) 69000 display support │ │
│ │ [ ] IMS Twin Turbo display support │ │
│ │ () VGA 16-color graphics support │ │
│ │ [ ] VESA VGA graphics support │ │
│ │ [ ] EFI-based Framebuffer Support │ │
│ │ () Hecuba board support │ │
│ │ () Hercules mono graphics support │ │
│ │ () Epson S1D13XXX framebuffer support │ │
│ │ () nVidia Framebuffer Support │ │
│ │ () nVidia Riva support │ │
│ │ () Intel 810/815 support (EXPERIMENTAL) │ │
│ │ () Intel LE80578 (Vermilion) support │ │
│ │ (*) Intel 830M/845G/852GM/855GM/865G/915G/945G support (EXPERIMENTAL) │ │
│ │ [ ] Intel driver Debug Messages │ │
│ │ [*] DDC/I2C for Intel framebuffer support │ │
│ │ () Matrox acceleration │ │
│ │ () ATI Radeon display support │ │
│ │ () ATI Rage128 display support │ │
│ │ () ATI Mach64 display support │ │
│ │ () S3 Trio/Virge support │ │
│ │ () S3 Savage support │ │
│ │ () SiS/XGI display support │ │
│ │ () NeoMagic display support │ │
│ │ () IMG Kyro support │ │
│ │ () 3Dfx Banshee/Voodoo3 display support │ │
│ │ () 3Dfx Voodoo Graphics (sst1) support │ │
│ │ () VIA VT8623 support │ │
│ │ () Cyberblade/i1 support │ │
│ │ () Trident support │ │
│ │ () ARK 2000PV support │ │
│ │ () Permedia3 support (EXPERIMENTAL) │ │
│ │ [ ] AMD Geode family framebuffer support (EXPERIMENTAL) │ │
│ │ () Virtual Frame Buffer support (ONLY FOR TESTING!) │ │

Console display driver support 的配置
│ │ -*- VGA text console │ │
│ │ [*] Enable Scrollback Buffer in System RAM │ │
│ │ (128) Scrollback Buffer Size (in KB) │ │
│ │ [*] Video mode selection support │ │
│ │ (*) Framebuffer Console support │ │
│ │ [ ] Map the console to the primary display device │ │
│ │ [ ] Framebuffer Console Rotation │ │
│ │ [ ] Support for the Framebuffer Console Decorations │ │
│ │ [ ] Select compiled-in fonts │ │

2.修改 make.conf
为 make.conf 增加一下内容
INPUT_DEVICES=”keyboard mouse”
#VIDEO_CARDS=”i810″ # i810 是错误的,使用的话无法开启3D加速
VIDEO_CARDS=”intel”

3. 安装 x11-drivers/xf86-video-intel xorg-x11 gnome
emerge -av x11-drivers/xf86-video-intel xorg-x11 gnome
这一步可能还有其它的东西,不过不记得了。

4.配置xorg.conf
我的配置是
[coolcode download=”xorg.conf”]
Section “ServerLayout”
Identifier “X.org Configured”
Screen 0 “Screen0” 0 0
InputDevice “Mouse0” “CorePointer”
InputDevice “Keyboard0” “CoreKeyboard”
EndSection

Section “Files”
RgbPath “/usr/share/X11/rgb”
ModulePath “/usr/lib/xorg/modules”
FontPath “/usr/share/fonts/misc/”
FontPath “/usr/share/fonts/TTF/”
FontPath “/usr/share/fonts/OTF”
FontPath “/usr/share/fonts/Type1/”
FontPath “/usr/share/fonts/100dpi/”
FontPath “/usr/share/fonts/75dpi/”
EndSection

Section “Module”
#这里是3D加速相关的
Load “dri”
Load “glx”
#Load “drm” # libdrm.a
Load “extmod”
Load “xtrap”
Load “record”
Load “GLcore”
Load “dbe”
Load “freetype”
Load “type1”
EndSection

# 这里是3D加速的部分
Section “dri”
Mode 0666
EndSection

Section “InputDevice”
Identifier “Keyboard0”
Driver “kbd”
EndSection

Section “InputDevice”
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/input/mice”
Option “ZAxisMapping” “4 5 6 7”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Monitor Vendor”
ModelName “Monitor Model”
# HorizSync 28.0 – 51.0
# VertRefresh 43.0 – 60.0
Modeline “800x600_85.00” 56.55 800 840 928 1056 600 601 604 630 -HSync +Vsync
# 1024×768 @ 75.00 Hz (GTF) hsync: 60.15 kHz; pclk: 81.80 MHz
Modeline “1024x768_75.00” 81.80 1024 1080 1192 1360 768 769 772 802 -HSync +Vsync
#
EndSection

Section “Device”
### Available Driver options are:-
### Values: : integer, : float, : “True”/”False”,
### : “String”, : ” Hz/kHz/MHz”
### [arg]: arg optional
#Option “NoAccel” # []
#Option “SWcursor” # []
#Option “ColorKey” #
#Option “CacheLines” #
#Option “Dac6Bit” # []
#Option “DRI” # []
#Option “NoDDC” # []
#Option “ShowCache” # []
#Option “XvMCSurfaces” #
#Option “PageFlip” # []
Identifier “Card0”
# 这里是驱动选择,i810是错误的。
Driver “intel”
# Driver “i810”
VendorName “Intel Corporation”
BoardName “82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device”
BusID “PCI:0:2:0”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Card0”
Monitor “Monitor0”
SubSection “Display”
Viewport 0 0
Depth 1
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 4
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 8
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 15
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 16
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 24
EndSubSection
EndSection
[/coolcode]

No comment »

Gentoo 下安装 git 及解决 error: git was compiled without libcurl support. 错误

使用
emerge -av dev-util/git
就可以安装,不过在安装前最好先使用
# echo “dev-util/git webdav” >> /etc/portage/package.use
设置 webdav 标志。不然使用http地址时会出现错误。

gamexg@GGentoo ~/git $ git-clone http://www.bitsun.com/git/gittutorcn.git
Initialized empty Git repository in /home/gamexg/git/gittutorcn/.git/
error: git was compiled without libcurl support.
fatal: Don’t know how to clone http://www.bitsun.com/git/gittutorcn.git

Comments (1) »

Gentoo 下安装 Firefox 3 及(‘ebuild’, ‘/’, ‘www-client/mozilla-firefox-2.0.0.17’, ‘merge’) pulled in by (‘installed’, ‘/’, ‘gnome-extra/yelp-2.22.1-r2’, ‘nomerge’) 问题解决。

在 /etc/portage/package.keywords 添加下面的内容。

www-client/mozilla-firefox ~x86
dev-libs/nspr ~x86
dev-libs/nss ~x86
net-libs/xulrunner ~x86

在 /etc/make.conf 里的 USE 变量添加 xulrunner ,然会执行 sudo emerge firefox 就可以了。

如果忘了添加 xulrunner 会出现 yelp 依赖 firefox2 的现象出现下面的错误(添加上xulrunner就可以解决):

gamexg@GGentoo ~ $ sudo emerge -p –update –deep –newuse world

These are the packages that would be merged, in order:

Calculating world dependencies –
!!! Multiple versions within a single package slot have been
!!! pulled into the dependency graph:

www-client/mozilla-firefox:0

(‘ebuild’, ‘/’, ‘www-client/mozilla-firefox-2.0.0.17’, ‘merge’) pulled in by
(‘installed’, ‘/’, ‘gnome-extra/yelp-2.22.1-r2’, ‘nomerge’)

(‘installed’, ‘/’, ‘www-client/mozilla-firefox-3.0.3’, ‘nomerge’) (no parents)

It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously. If such a conflict exists in the
dependencies of two different packages, then those packages can not be
installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man page
or refer to the Gentoo Handbook.

… done!
[ebuild UD] www-client/mozilla-firefox-2.0.0.17 [3.0.3] USE=”-debug% -filepicker% -moznopango% -xforms% -xinerama% -xprint%” LINGUAS=”-bg%”

Comments (1) »

Gentoo 问题:checking for pygtk 2.8.0 installed for python 2.4… not found configure: error: required pygtk version not found

安装 gnome 时出现错误,内容:
checking for pygtk 2.8.0 installed for python 2.4… not found
configure: error: required pygtk version not found

这个应该是升级到 python2.5 后,没有运行 python-updater 的原因。

No comment »