Using apt-get in scratchbox

[size=13]In a new installed scratchbox, on which Maemo SDK is based on, there is a DNS problem.

While:[/size][code][sbox-SDK_PC: ~] fakeroot apt-get update[/code]
[size=13]We see:[/size]
[quote]Temporary failure resolving 'repository.maemo.org'[/quote]

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

[size=13]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)[/size]
[code]$ sudo cp /etc/resolv.conf /scratchbox/etc/resolv.conf[/code]

[size=13]And what about c? Forget it...

Refer to:
[url]http://guoyong.org/2007/05/27/327[/url]
[url]http://www.internettablettalk.com/forums/archive/index.php/t-6332.html[/url][/size]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[size=13]We can run apt-get now.

Inside the scratchbox, the sources.list for apt-get locates here:[/size]
[quote]/scratchbox/users/maemo/targets/SDK_PC/etc/apt[/quote]

[size=13]Edit it by:[/size]
[code]$ sudo gedit /scratchbox/users/maemo/targets/SDK_PC/etc/apt/sources.list[/code]

[size=13]Copy these in:[/size]
[quote]#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
[/quote]
[size=13]The first three lines are those by default.
Remember that the sources.list outside scratchbox does not fit here.[/size]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[size=13]Each time you modified sources.list, don't forget to run:[/size][code][sbox-SDK_PC: ~] fakeroot apt-get update[/code]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值