arch linux装不了软件了。
- bjsm
- 帖子: 2324
- 注册时间: 2007-05-13 16:45
- 来自: 阿拉斯加群岛其中的一个岛上一片原始森林里其中的一颗树上
- 联系:
-
- 帖子: 164
- 注册时间: 2007-05-13 10:59
- karron
- 帖子: 6226
- 注册时间: 2005-06-11 14:03
- 来自: 不明真相的群众
- 联系:
lyz_new 写了:首先应该先设置好pacman.conf吧。用Server = xxxxxx ,别用Include这种方式了。要用的话,就应该存在/etc/pacman.d/core, /etc/pacman.d/extra, /etc/pacman.d/community这三个文件,而且文件内容是Server = xxxxxx.
资料贼少?arch的wiki这么完善的英文资料都能叫做资料贼少?而且Linuxsir的arch中文资料对于入门,完全足够了。
看起来这位arch用户过时了, 比我这个非arch还过时... 新版pacman只用mirrorlist, 不需要core, extra等了...
我的blog,关于技术,软件,linux,vim <---- 所有博客均被河蟹.
-
- 帖子: 43
- 注册时间: 2006-12-19 21:47
Re: arch linux装不了软件了。
明显是pacman.conf设置不对,现在/etc/pacman.d下早就没有core,extra,community了,只有mirrorlist。发一份我的pacman.conf文件bjsm 写了:郁闷的说。哪位指教下。
[root@Arch lubas]# pacman -Sy mplayer
error: config file /etc/pacman.d/core could not be read.
error: config file /etc/pacman.d/extra could not be read.
error: config file /etc/pacman.d/community could not be read.
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck.
[root@Arch lubas]# yaourt -Sy
==> Pacman is currently in use, please wait.
#
# /etc/pacman.conf
#
# See the pacman manpage for option directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
HoldPkg = pacman glibc
XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/aria2c -s 2 -m 2 -d / -o %o %u
#XferCommand = exec /usr/bin/pacget %u %o
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# Testing is disabled by default. To enable, uncomment the following
# two lines. You can add preferred servers immediately after the header,
# and they will be used before the default mirrors.
#[testing]
#Include = /etc/pacman.d/mirrorlist
[archlinuxfr]
Server = http://repo.archlinux.fr/i686
[core]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist
[extra]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist
[community]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist
# Unstable is disabled by default. To enable, uncomment the following
# two lines. You can add preferred servers immediately after the header,
# and they will be used before the default mirrors.
#[unstable]
#Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#Server = file:///home/custompkgs
- yysq009
- 帖子: 2682
- 注册时间: 2007-01-28 23:00
- 来自: @江西|南昌@
- 联系:
- iblicf
- 帖子: 3766
- 注册时间: 2007-01-15 17:15
- xrfang
- 帖子: 1116
- 注册时间: 2006-12-08 10:21
- bjsm
- 帖子: 2324
- 注册时间: 2007-05-13 16:45
- 来自: 阿拉斯加群岛其中的一个岛上一片原始森林里其中的一颗树上
- 联系:
- yysq009
- 帖子: 2682
- 注册时间: 2007-01-28 23:00
- 来自: @江西|南昌@
- 联系:
- karron
- 帖子: 6226
- 注册时间: 2005-06-11 14:03
- 来自: 不明真相的群众
- 联系:
-
- 帖子: 72
- 注册时间: 2006-04-13 13:43
这位兄弟,你说不要一切按部就班是对的,各人遇到的情况有时完全相同,有时只是表象相同,所以你在网上寻求某个问题的答案时,经常会出现好多人给出好多不同的解决方法,有的你能够成功解决问题,有的反而使你的问题更加严重。不明白问题发生的原因就盲目按照别人给出的所谓“纠错”步骤修正问题当然容易出错,而且让你对这个问题更加迷惑。xrfang 写了:没什么好哭的!我发生过一样的事情,就是重装了事。不过我是学习,在vbox里面搞的。现在真机安装一次成功。
关键点:不要自作聪明,一切按部就班。我就是看到了说明,所谓mirrorlist代替了pacman.d/core之类的说法,去把这些文件山掉了,然后出和LZ一模一样的毛病,而且恢复不回来!第二次安装发现,pacman -S pacman就把这些事情做了,自己不要乱搞!
就这个pacman配置的问题来说,你用的是老版本的配置,所以会有core、community之类的配置文件,但新版的pacman已经改成只用mirrorlist文件了。pacman更新为新版本后,不会自作主张的把用户配置好的文件替换掉(容易造成pacman无法正常工作),它会在/etc下生成一个pacman.conf.pacnew,这个是新的配置文件模板,对于新的配置应该怎么设,里面写得很清楚,你可以根据注释修改这个模板,从而采用新配置,也可以继续使用原来的配置方式(谁也不知道pacman以后会不会一直兼容这种配置)。
事实上,Archlinux中其他部件有配置更新时,都会生成一个“配置文件名称.pacnew”的新配置模板。
总之,出现问题要解决时还要靠自己多分析,不要盲目照搬别人给出的解决方法,然后在知其然不知其所以然的情况下根据自己尝试的结果来评判别人给出的解决方法是否正确(请所有Linuxer牢记一点,别人能给出解决方法说明这种方法对人家有效,但对你不一定适用)。