`
cloudhe
  • 浏览: 109046 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Using apt-get in scratchbox

阅读更多
In a new installed scratchbox, on which Maemo SDK is based on, there is a DNS problem.

While:
[sbox-SDK_PC: ~] fakeroot apt-get update

We see:
引用
Temporary failure resolving 'repository.maemo.org'


The reason is we have three resolv.conf files in system:
  • a)   /etc/resolv.conf[*]b)   /scratchbox/etc/resolv.conf[*]c)   /scratchbox/user/cloud/target/SDK_PC/etc/resolv.conf

a is the one we're using to deel with DNS ouside scratchbox.
b is the one we're using to deel with DNS inside scratchbox.
c is empty but a line "nameserver 127.0.0.1".

Each of them differs from any other.

So, it's easy now: (do it ouside the scratchbox)

$ sudo cp /etc/resolv.conf /scratchbox/etc/resolv.conf


And what about c? Forget it...

Refer to:
http://guoyong.org/2007/05/27/327
http://www.internettablettalk.com/forums/archive/index.php/t-6332.html

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
We can run apt-get now.

Inside the scratchbox, the sources.list for apt-get locates here:

引用
/scratchbox/users/maemo/targets/SDK_PC/etc/apt


Edit it by:
$ sudo gedit /scratchbox/users/maemo/targets/SDK_PC/etc/apt/sources.list


Copy these in:
引用
#deb http://repository.maemo.org/ bora free non-free extras
#deb-src http://repository.maemo.org/ bora free non-free extras
#deb file:/home/maemo/maemo-sdk-nokia-binaries_3.0 bora explicit
# Latest releases: maemo 3.x 'bora' repository
deb http://repository.maemo.org/ bora free non-free
deb-src http://repository.maemo.org/ bora free non-free
# Older releases: maemo 3.0 'bora' repository
deb http://repository.maemo.org/ maemo3.0 free non-free
deb-src http://repository.maemo.org/ maemo3.0 free non-free

The first three lines are those by default.
Remember that the sources.list outside scratchbox does not fit here.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Each time you modified sources.list, don't forget to run:
[sbox-SDK_PC: ~] fakeroot apt-get update



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics