标签为 "Linux" 的存档

Archlinux升级出现PGP KEY is unknown的解决方法

pacman大版本升级一次事儿多。

# pacman -Syu

出现错误,类似:

:: Import PGP key F53A76ED, “Dan McGee <dpmcgee@gmail.com>”, created 2007-06-27? [Y/n] n
error: alsa-lib: key “771DF6627EDF681F” is unknown
:: Import PGP key 7EDF681F, “Tobias Powalowski <tpowa@archlinux.org>”, created 2011-07-18? [Y/n] y
error: alsa-plugins: key “A5E9288C4FA415FA” is unknown

无论你选择多少次Y都会error

搜了一下,大概是pacman 4.0 需要验证发行密钥合法性

搜到:https://wiki.archlinux.org/index.php/Pacman-key

执行

curl https://www.archlinux.org/{developers,trustedusers}/ |
awk -F\” ‘(/pgp.mit.edu/) {sub(/.*search=0x/,””);print $1}’ |
xargs pacman-key –recv-keys

有点效果,出错变成了:

error: a52dec: signature from “Stéphane Gaudreault <stephane@archlinux.org>” is unknown trust
error: aalib: signature from “Eric Belanger <eric@archlinux.org>” is unknown trust
error: zlib: signature from “Pierre Schmitz <pierre@archlinux.de>” is unknown trust
error: libpng: signature from “Ionut Biru <ibiru@archlinux.org>” is unknown trust
error: wv: signature from “Giovanni Scafora <giovanni@archlinux.org>” is unknown trust
error: gcc-libs: signature from “Allan McRae <me@allanmcrae.com>” is unknown trust
error: pcre: signature from “Allan McRae <me@allanmcrae.com>” is unknown trust
error: glib2: signature from “Allan McRae <me@allanmcrae.com>” is unknown trust
error: libjpeg-turbo: signature from “Allan McRae <me@allanmcrae.com>” is unknown trust
error: libtiff: signature from “Eric Belanger <eric@archlinux.org>” is unknown trust
error: gdk-pixbuf2: signature from “Ionut Biru <ibiru@archlinux.org>” is unknown trust
error: librsvg: signature from “Ionut Biru <ibiru@archlinux.org>” is unknown trust
error: desktop-file-utils: signature from “Jan de Groot <jgc@archlinux.org>” is unknown trust
error: abiword: signature from “Giovanni Scafora <giovanni@archlinux.org>” is unknown trust
error: rsync: signature from “Ionut Biru <ibiru@archlinux.org>” is unknown trust
error: abs: signature from “Stéphane Gaudreault <stephane@archlinux.org>” is unknown trust
error: acpi: key “5C2E46A0F53A76ED” is unknown

……

算了,天太晚,实在懒得搞了。直接关掉这个验证机制

#vim /etc/pacman.conf

在 [option]段后加上

SigLevel = Never

然后升级,搞定。

Archlinux升级问题的解决

Arch很久没更新了,今天更新出现问题。

# pacman -Syu
:: Synchronizing package databases…
archlinuxfr is up to date
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: The following packages should be upgraded first :
pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] y

resolving dependencies…
looking for inter-conflicts…
error: failed to prepare transaction (could not satisfy dependencies)
:: package-query: requires pacman<3.6
也就是说,要先升级pacman,但是pacman因为依赖问题不允许升级……

好吧,那就曲线救国:
# pacman -Rs yaourt package-query

再执行:
# pacman -Syu

恩,可以升级了,然后提示:
>>> Run `pacman-key –init` to set up your pacman keyring.

好,照它说的,执行
# pacman-key –init

搞定。

然后再执行
# pacman -Syu
发现……
Total Download Size: 399.53 MiB
Total Installed Size: 1782.69 MiB
是很久没更新了…让它更新去吧~

 

archlinux 升级时出现 filesystem: /etc/mtab exists in filesystem 的解决

执行#pacman -Syu升级archlinux的时候,出现错误:

filesystem: /etc/mtab exists in filesystem
Errors occurred, no packages were upgraded.

发现在archlinux.org主页上有这个问题的解决方法:

http://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required/

# pacman -S filesystem –force

Ok,然后

#pacman -Syu

成功升级。

 

linux下批量下载优酷视频

标题针对优酷,其实只要是flvcd支持解析的音视频网站都可以,比如常用的优酷、土豆、酷6、新浪播客、PPTV……现在已经支持72家音视频网站了。

http://www.flvcd.com/
在框里粘贴视频地址,然后点”开始GO!“
会出现很多地址,地址最下面有:高清模式解析。
我想下载清晰度高一点的视频,所以就点高清模式了。

点击“M3U列表”,下载play.m3u
$ wget -i play.m3u
出现很多ERROR 403: Forbidden.

试试加上User Agent,让服务器认为是浏览器访问:
$ wget –user-agent=”Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16″ – i play.m3u

合并文件:
$ mencoder -oac pcm -ovc copy -idx -o output.flv `ls`

这篇关于批量转换flv到avi的博文有一定参考价值:
http://blog.csdn.net/hercaffe/article/details/6180133

旁门左道三千不如官方文档一次

最近重装Linux(上次是从06年升级到现在的Debian,因为换硬盘也想换个工作系统尝试尝试)遇到一个不大不小的问题,在Arch Linux下怎么连接VPN。

Debian下编辑/etc/ppp/peers/<TUNNEL>文件的经验,在Arch上无效了……ifconig -a看样子是有ppp连接了,但是浏览器还是没法走VPN通道。

Google到Linux文档的共同特点一般都是,少而且老。其中某一些还在Redhat9和Kernel2.4上考古,另一些则是验证了我尝试失败的经验的正确性……

正在无奈之际,到官方Wiki上搜了一下。结果按官方Wiki的文档,很容易找到了解决方法。原来还是要更新路由表。

事儿解决的还算顺利,安装过程中没少参考Wiki,但是安装完成后遇到问题就抛掉Wiki了。官方文档有系统性和专业性的特点,而且通常比较新。(当然也有例外,现在已经Kernel 3.1.1了,官方Wikipeida的无线网络链接的介绍还停留在Kernel 2.6)在大多数时候遇到问题,善用官方Wiki是省时省力的解决方案。