LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1098|回复: 7

pacman出问题了,百思不得其解

[复制链接]
发表于 2006-7-13 18:31:39 | 显示全部楼层 |阅读模式
初装系统0.7.2-base完毕后,需要使用pacman继续工作:


  1. pacman -Sy
  2. [color="Red"]config: line 35: syntax error[/color]
复制代码


[color="DarkOrange"]这是怎么回事?
“config: line 35”指的是哪个文件的35行?
目前ping网关、内网其他机器都可以通,ping mirror.bjtu.edu.cn可以正确解析其IP。

贴上几个配置文件供大家检阅:
[color="Blue"]rc.conf

  1. #
  2. # /etc/rc.conf - Main Configuration for Arch Linux
  3. #

  4. #
  5. # -----------------------------------------------------------------------
  6. # LOCALIZATION
  7. # -----------------------------------------------------------------------
  8. #
  9. # LOCALE: available languages can be listed with the 'locale -a' command
  10. # HARDWARECLOCK: set to "UTC" or "localtime"
  11. # TIMEZONE: timezones are found in /usr/share/zoneinfo
  12. # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
  13. # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
  14. # CONSOLEMAP: found in /usr/share/kbd/unimaps
  15. # USECOLOR: use ANSI color sequences in startup messages
  16. #
  17. LOCALE="en_US.utf8"
  18. HARDWARECLOCK="localtime"
  19. TIMEZONE="Shanghai/Asia"
  20. KEYMAP="us"
  21. CONSOLEFONT=
  22. CONSOLEMAP=
  23. USEcolor="yes"

  24. #
  25. # -----------------------------------------------------------------------
  26. # HARDWARE
  27. # -----------------------------------------------------------------------
  28. #
  29. # Scan hardware and load required modules at bootup
  30. MOD_AUTOLOAD="yes"
  31. # Module Blacklist - modules in this list will never be loaded by udev
  32. MOD_BLACKLIST=()
  33. #
  34. # Modules to load at boot-up (in this order)
  35. #   - prefix a module with a ! to blacklist it
  36. #
  37. MODULES=()
  38. # Scan for LVM volume groups at startup, required if you use LVM
  39. USELVM="no"

  40. #
  41. # -----------------------------------------------------------------------
  42. # NETWORKING
  43. # -----------------------------------------------------------------------
  44. #
  45. HOSTNAME="myhost"
  46. #
  47. # Interfaces to start at boot-up (in this order)
  48. # Declare each interface then list in INTERFACES
  49. #   - prefix an entry in INTERFACES with a ! to disable it
  50. #   - no hyphens in your interface names - Bash doesn't like it
  51. #
  52. # Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
  53. #
  54. lo="lo 127.0.0.1"
  55. eth0="eth0 192.168.1.9 netmask 255.255.255.0 broadcast 192.168.1.255"
  56. INTERFACES=(lo eth0)
  57. #
  58. # Routes to start at boot-up (in this order)
  59. # Declare each route then list in ROUTES
  60. #   - prefix an entry in ROUTES with a ! to disable it
  61. #
  62. gateway="default gw 192.168.1.168"
  63. ROUTES=(gateway)
  64. #
  65. # Enable these network profiles at boot-up.  These are only useful
  66. # if you happen to need multiple network configurations (ie, laptop users)
  67. #   - set to 'menu' to present a menu during boot-up (dialog package required)
  68. #   - prefix an entry with a ! to disable it
  69. #
  70. # Network profiles are found in /etc/network-profiles
  71. #
  72. #NET_PROFILES=(main)

  73. #
  74. # -----------------------------------------------------------------------
  75. # DAEMONS
  76. # -----------------------------------------------------------------------
  77. #
  78. # Daemons to start at boot-up (in this order)
  79. #   - prefix a daemon with a ! to disable it
  80. #   - prefix a daemon with a @ to start it up in the background
  81. #
  82. DAEMONS=(syslog-ng !hotplug !pcmcia network netfs crond)


  83. # End of file

复制代码




[color="Blue"]resolv.conf

  1. #
  2. # /etc/resolv.conf
  3. #

  4. #search <yourdomain.tld>
  5. nameserver 202.114.88.10

  6. # End of file

复制代码



[color="Blue"]pacman.conf

  1. #
  2. # /etc/pacman.conf
  3. #
  4. # NOTE: If you find a mirror that is geographically close to you, please
  5. #       move it to the top of the server list, so pacman will choose it
  6. #       first.
  7. #
  8. # To re-sort your mirror lists by ping/traceroute results, use the
  9. # /usr/bin/sortmirrors script.  It requires the "netselect" package.
  10. #

  11. # See the pacman manpage for option directives

  12. #
  13. # GENERAL OPTIONS
  14. #
  15. [options]
  16. LogFile     = /var/log/pacman.log
  17. NoUpgrade   = etc/passwd etc/group etc/shadow etc/sudoers
  18. NoUpgrade   = etc/fstab etc/raidtab etc/ld.so.conf
  19. NoUpgrade   = etc/rc.conf etc/rc.local
  20. NoUpgrade   = etc/modprobe.conf etc/modules.conf
  21. NoUpgrade   = etc/lilo.conf boot/grub/menu.lst
  22. HoldPkg     = pacman glibc
  23. #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u

  24. #
  25. # REPOSITORIES
  26. #   - can be defined here or included from another file
  27. #   - pacman will search repositories in the order defined here.
  28. #   - local/custom mirrors can be added here or in separate files
  29. #

  30. #[testing]
  31. Server = http://mirror.bjtu.edu.cn/archlinux/testing/os/i686

  32. [current]
  33. Server = http://mirror.bjtu.edu.cn/archlinux/current/os/i686

  34. [extra]
  35. Server = http://mirror.bjtu.edu.cn/archlinux/extra/os/i686

  36. #[unstable]
  37. Server = http://mirror.bjtu.edu.cn/archlinux/unstable/os/i686

  38. #[community]
  39. Server = http://mirror.bjtu.edu.cn/archlinux/community/os/i686

  40. # An example of a custom package repository.  See the pacman manpage for
  41. # tips on creating your own repositories.
  42. #[custom]
  43. #Server = file:///home/custompkgs
复制代码
发表于 2006-7-13 19:40:43 | 显示全部楼层
把下面红色标注的部分去掉
  1. [color="Red"]#[/color][testing]
  2. Server = http://mirror.bjtu.edu.cn/archlinux/testing/os/i686
  3. [current]
  4. Server = http://mirror.bjtu.edu.cn/archlinux/current/os/i686
  5. [extra]
  6. Server = http://mirror.bjtu.edu.cn/archlinux/extra/os/i686
  7. [color="Red"]#[/color][unstable]
  8. Server = http://mirror.bjtu.edu.cn/archlinux/unstable/os/i686
  9. [color="Red"]#[/color][community]
  10. Server = http://mirror.bjtu.edu.cn/archlinux/community/os/i686
复制代码

或者你把testing和unstable的地址也注释掉,community推荐打开。建议改成这样:

  1. #[testing]
  2. #Server = http://mirror.bjtu.edu.cn/archlinux/testing/os/i686
  3. [current]
  4. Server = http://mirror.bjtu.edu.cn/archlinux/current/os/i686
  5. [extra]
  6. Server = http://mirror.bjtu.edu.cn/archlinux/extra/os/i686
  7. #[unstable]
  8. #Server = http://mirror.bjtu.edu.cn/archlinux/unstable/os/i686
  9. [community]
  10. Server = http://mirror.bjtu.edu.cn/archlinux/community/os/i686
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-13 19:53:23 | 显示全部楼层
是这个的原因?我试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-13 20:02:03 | 显示全部楼层
晕了,糊涂了,忘了把#去掉了。
谢谢狱卒提醒。
我说怎么可能装出问题了。

  1. [color="Lime"]#[/color][testing]
  2. Server = http://mirror.bjtu.edu.cn/archlinux/testing/os/i686

  3. [current]
  4. Server = http://mirror.bjtu.edu.cn/archlinux/current/os/i686

  5. [extra]
  6. Server = http://mirror.bjtu.edu.cn/archlinux/extra/os/i686

  7. [color="lime"]#[/color][unstable]
  8. Server = http://mirror.bjtu.edu.cn/archlinux/unstable/os/i686

  9. [color="lime"]#[/color][community]
  10. Server = http://mirror.bjtu.edu.cn/archlinux/community/os/i686
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-7-17 09:57:24 | 显示全部楼层

我也有问题

  1. # pacman -Syu
  2. :: Synchronizing package databases...
  3. :: current is up to date
  4. extra                    [################] 100%     253K    66.2K/s  00:00:03
  5. could not extract apollon-1.0.2.1-3/desc: Invalid argument
复制代码

怎么办?
回复 支持 反对

使用道具 举报

发表于 2006-7-17 13:28:25 | 显示全部楼层
Post by storm999
  1. # pacman -Syu
  2. :: Synchronizing package databases...
  3. :: current is up to date
  4. extra                    [################] 100%     253K    66.2K/s  00:00:03
  5. could not extract apollon-1.0.2.1-3/desc: Invalid argument
复制代码
怎么办?
服务器有问题吧,也许明天就好了。
回复 支持 反对

使用道具 举报

发表于 2006-7-19 08:42:26 | 显示全部楼层
  1. # pacman -Syu
  2. :: Synchronizing package databases...
  3. :: current is up to date
  4. extra                    [################] 100%     253K    89.1K/s  00:00:02
  5. could not extract balsa-2.3.13-1/depends: Invalid argument
复制代码
今天还是错,不知大家是否也是这样?
是服务器的错,还是自己的错?服务器是:
Server = ftp://ftp.archlinux.org/extra/os/i686
回复 支持 反对

使用道具 举报

发表于 2006-7-19 09:41:00 | 显示全部楼层
Post by storm999
  1. # pacman -Syu
  2. :: Synchronizing package databases...
  3. :: current is up to date
  4. extra                    [################] 100%     253K    89.1K/s  00:00:02
  5. could not extract balsa-2.3.13-1/depends: Invalid argument
复制代码

今天还是错,不知大家是否也是这样?
是服务器的错,还是自己的错?


你用的是哪个镜像?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表