LinuxSir.Org  
| 网站首页 | 论坛帮助 |

欢迎来到LinuxSir.Org!
您还未登录,请登录后查看论坛,或者点击论坛上方的注册链接注册新账号。


发表新主题 回复
精华主题  
主题工具
旧 07-02-06, 11:31 第 31 帖
firefoxmmx
 
firefoxmmx 的头像
 
 
注册会员  
  注册日期: Mar 2004
  帖子: 1,876
  精华: 2
 

楼主,求救~~

我用的你的那个urlgrab文件把以前那个覆盖了,然后我用的是proz下载~~

yum 的时候他说无法打开remond.xml.gz文件~~

代码:
Got DL succesfully, now renaming file:?? Renaming file repomd.xml ..... All Done. Error: Cannot open/read repomd.xml file for repository: fedora-cn
我的urlgrab文件是

代码:
# filename = urllib.url2pathname(path) if not (os.path.splitext(filename)[1] in ('.hdr')): # print "I want use wget or even axel to download,not you!" if urlparse.urlparse(url)[0] == "ftp": raise URLGrabError(2, _('Ftp can not, no proxy provide')) # if os.system("wget %s -O %s" % (url,filename)) != 0: # print "%s\n%s\n%s\n%s\n" % (path,parts,kk,filename) # print '%s' % urllib.url2pathname(filename) if os.system("proz -k 5 -r -t 4 --retry-delay=6 --no-getch --no-curses %s -P %s" % (url,os.path.dirname(filename))) != 0: raise URLGrabError(2, _('System function return fail')) return filename
现在不知道怎么办,我用wget来下载,也要出这个错误~~~







__________________
DELL V 1500
Intel Core Duo T7500,
2GB DDR2,
320GB SATA
15.3" 1280*800,
Nvidia GF8600M GT 256MB,
DVD R+/-W
---
佛经说,人有八苦:生老病死求不得怨憎,爱别离五阴盛,故我苦
圣经说,人有七罪:饕餮贪婪懒惰淫欲傲慢嫉妒暴怒,故我有罪
  firefoxmmx 当前离线   回复时引用此帖
旧 07-02-06, 12:12 第 32 帖
firefoxmmx
 
firefoxmmx 的头像
 
 
注册会员  
  注册日期: Mar 2004
  帖子: 1,876
  精华: 2
 

如果喜欢用图形yum的朋友,常常可以看到,有些yum插件无法加载~~~~

比如楼主写的axelget.py~~

你只需要一个小的改动,就可以正常加载了~~~~
先到/usr/lib/python2.4/site-packages/下,
如果你的用的yumex 你只需要改动yumex/yumexBase.py,找到下面部分加入红色部分
代码:
# Only use CORE Plugins if not self.yumexconf.noplugins: self.progresslog( _( "Setup Yum : Plugins" ) ) self.doConfigSetup( plugin_types=( yum.plugins.TYPE_CORE, yum.plugins.TYPE_INTERACTIVE ), debuglevel=self.yumexconf.yumdebuglevel ) else: self.progresslog( _( "Setup Yum : Plugins are disabled" ) )
如果是用pirut的朋友可以在,pirut/__init__.py里找到
相同的部分,加入红色部分即可~~

然后启动yumex或者pirut,看是不是多了你的插件了~~
  firefoxmmx 当前离线   回复时引用此帖
旧 07-02-06, 17:38 第 33 帖
iveney 帅哥
 
iveney 的头像
 
 
注册会员  
  注册日期: Mar 2006
  我的住址: 韶关<->广州
  帖子: 566
  精华: 0
 

说实话就是内地网速的问题。我在HK这边用起yum上国外镜像简直就是飞一般的速度。
  iveney 当前离线   回复时引用此帖
旧 07-02-06, 17:53 第 34 帖
joyfun
 
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 206
  精华: 0
 

恩 主要还是 国内网速慢的原因 ubuntu debian 国内的镜像速度都不错 fedora国内有镜像 但是更新不勤
其实 用yumex挺好的 默认自动选择最快的镜像 而且软件包的管理也很方便 适合于 图形界面下用 不过如果 在终端上 貌似只有楼主的方法了







__________________
Enjoy it and have Fun ^_^
  joyfun 当前离线   回复时引用此帖
旧 07-03-24, 22:12 第 35 帖
gongjiy
 
gongjiy 的头像
 
 
注册会员  
  注册日期: Oct 2006
  帖子: 35
  精华: 0
 

为什么我编译时提示系统有问题:The strip option is enabled. This should not be a problem usually, but on some
systems it breaks stuff.

Configuration done:
Internationalization disabled.
Debugging disabled.
Binary stripping enabled.
  gongjiy 当前离线   回复时引用此帖
旧 07-04-22, 22:06 第 36 帖
karter123
 
 
 
注册会员  
  注册日期: Oct 2004
  我的住址: peiking
  帖子: 1
  精华: 0
 

标题: linux第一次跟我生气了!!!


# yum -y update
Loading "fastestmirror" plugin
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
core [1/4]
I want use wget or even axel to download,not you!
I want use wget or even axel to download,not you!
Initializing download: http://ftp.wsisiz.edu.pl/pub/linux/f...ata/repomd.xml
File size: 1140 bytes
No state file, cannot resume!
I want use wget or even axel to download,not you!
Initializing download: http://distribuciones.telecable.es/f...ata/repomd.xml
File size: 1140 bytes
No state file, cannot resume!
I want use wget or even axel to download,not you!
Initializing download: http://fedora.ifc.unam.mx/fedora/5/i...ata/repomd.xml
File size: 1140 bytes

能告诉我怎么回事么?!!
  karter123 当前离线   回复时引用此帖
旧 07-04-23, 08:58 第 37 帖
lincomet
 
lincomet 的头像
 
 
版主  
  注册日期: Aug 2004
  我的住址: 无锡
  帖子: 3,486
  精华: 6
 

最好是对yum进行重新设计。其实以前的apt-rpm挺好的,为什么fedora社区不用呢,唉。







__________________
Notebook: MacBook: C2D 2.26GHz, 4G RAM, 500G HD, GF9400M
OS: Mac OS X, Ubuntu 10.04, Ubuntu Server 10.04
Desktop: PD 2.5GHz, 2G RAM, 500G HD
OS: Ubuntu 10.04
  lincomet 当前离线   回复时引用此帖
旧 07-04-23, 12:41 第 38 帖
ccino
 
 
 
注册会员  
  注册日期: Mar 2004
  帖子: 24
  精华: 0
 

我一直在使用fastestmirror插件
  ccino 当前离线   回复时引用此帖
旧 07-04-25, 13:35 第 39 帖
y654n
 
y654n 的头像
 
 
注册会员  
  注册日期: Apr 2007
  帖子: 56
  精华: 0
 

编译完axle后第一次用yum升级好快。。。后来再用就显示sh:axle 找不到了 。。
怎么回事 。。而且速度好慢。。
  y654n 当前离线   回复时引用此帖
旧 07-06-05, 22:44 第 40 帖
lgyaalgy
 
lgyaalgy 的头像
 
 
注册会员  
  注册日期: Aug 2004
  帖子: 122
  精华: 1
 

axelget.conf和axelget.py两个文件下不了,似乎网址错误,不知哪位能帮忙上传一下,谢谢!
  lgyaalgy 当前离线   回复时引用此帖
旧 07-06-16, 07:30 第 41 帖
lgyaalgy
 
lgyaalgy 的头像
 
 
注册会员  
  注册日期: Aug 2004
  帖子: 122
  精华: 1
 

标题: yum update问题


我安装了yum的axe插件,结果在升级时,出现了这样的问题
axel -a http://ftp.yz.yamagata-u.ac.jp/pub/l...2.fc7.i386.rpm -o //var/cache/yum/fedora/packages/libsidplay-1.36.57-12.fc7.i386.rpm
Initializing download: http://ftp.yz.yamagata-u.ac.jp/pub/l...2.fc7.i386.rpm
HTTP/1.1 404 Not Found
Execute axel cmd:
axel -a http://limestone.uoregon.edu/ftp/fed...2.fc7.i386.rpm -o //var/cache/yum/fedora/packages/libsidplay-1.36.57-12.fc7.i386.rpm
Initializing download: http://limestone.uoregon.edu/ftp/fed...2.fc7.i386.rpm
HTTP/1.1 404 Not Found
Execute axel cmd:
axel -a ftp://ftp.applios.net/pub/fedora/lin...2.fc7.i386.rpm -o //var/cache/yum/fedora/packages/libsidplay-1.36.57-12.fc7.i386.rpm
Initializing download: ftp://ftp.applios.net/pub/fedora/lin...2.fc7.i386.rpm

Execute axel cmd:
axel -a http://mirror.stanford.edu/fedora/li...2.fc7.i386.rpm -o //var/cache/yum/fedora/packages/libsidplay-1.36.57-12.fc7.i386.rpm
Initializing download: http://mirror.stanford.edu/fedora/li...2.fc7.i386.rpm
HTTP/1.1 404 Not Found
Execute axel cmd:
axel -a http://ftp.usf.edu/pub/fedora/linux/...2.fc7.i386.rpm -o //var/cache/yum/fedora/packages/libsidplay-1.36.57-12.fc7.i386.rpm
Initializing download: http://ftp.usf.edu/pub/fedora/linux/...2.fc7.i386.rpm
HTTP/1.1 404 Not Found
Package fedora has tried 6 mirrors,Skip plugin!
try to run rm cmd:rm -f //var/cache/yum/fedora/packages/libsidplay-1.36.57-12.fc7.i386.rpm //var/cache/yum/fedora/packages/libsidplay-1.36.57-12.fc7.i386.rpm.st
就是找不着文件,打开相应网址一看呢,地址有问题,也就是说,是yum的配置文件有问题(yum-updates.repo),我想如果修改一下,应该就可以用了,不过不知如何修改。哪位高手帮忙说明一下如何修改,或者解释一下,repo文件里的参数是何意思?如下:
[updates]
name=Fedora $releasever - $basearch - Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
着重带$符的谢谢!!!
  lgyaalgy 当前离线   回复时引用此帖
旧 07-06-16, 22:03 第 42 帖
marklf
 
marklf 的头像
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 366
  精华: 1
 

楼上的问题我也遇到,不知道是什么原因。
对于我的机器:
$releasever = 7 (指fedora7)
$basearch = i386 (指架构)

应该不是repo的问题,删除了这个plugin和axel后,yum工作正常。

Fedora7的软件仓库的目录结构与原先的Fc6不同,可能需要楼主的代码作调整吧。希望作者和哪位高手能修改一下,毕竟这个插件的提速效果十分明显,不能用很可惜!







__________________
Home: E6500 2.93G, DDR800 4G, GT240 G03 1G, WD SATA 1T.
Office: ThinkPad T400 2765-63c
Fedora 15

此帖于 07-06-16 23:20 被 marklf 编辑.
  marklf 当前离线   回复时引用此帖
旧 07-06-17, 11:27 第 43 帖
wq1977
 
 
 
注册会员  
  注册日期: Dec 2003
  帖子: 211
  精华: 5
 

谢谢这么多热心朋友的捧场。有些朋友以邮件或者悄悄话的形式询问了一些问题,在此统一回答一下:

1: 关于Fedora 7的问题。 由于Fedora 7 暂时还不能支持我的ATI的显卡,短期内没有升级到Fedora 7的打算,所以相关问题暂时无法回答。

2: 关于遇到Not Found的问题。 可能是在某些情况下拼凑remote url的方法不对,实际地址中少了 i386这个目录,增加上就可以了。

3:对于为什么要在开始下载前删除原先的文件或者在下载彻底失败后删除下载了一半的文件,主要是因为,下载失败以后将会使用yum自己的方式下载,如果目标文件已经存在,会导致yum下载到不可用的文件。

我对这个插件进行了一些改进,主要增加的功能如下:

第一: 增加了对目标文件的判断,如果目标文件已经存在并且大小和要求的大小相同,则认为文件已经存在,不再重复下载。

第二: 根据目标文件的大小自适应axel连接的数目,目前采用文件大小除以最小文件大小的方式来计算连接数。因为这个连接数并不是越多越好,对于小文件,很多的连接数不但导致下载速度降低,而且也容易出现下载错误。

第三: 下载下一个文件的时候将优先使用前一个下载的mirror。

第四:修正了原有的一些缺陷。比如如果第一个文件是小文件则后面的都不用axel下载,默认仅尝试前三个mirror等。

下面给出完整代码,有任何意见建议欢迎跟帖。

PHP 代码:
from yum.plugins import PluginYumExitTYPE_CORETYPE_INTERACTIVE
from urlparse import urljoin
import os

requires_api_version 
'2.3'
plugin_type = (TYPE_CORETYPE_INTERACTIVE)

enablesize=300000
trymirrornum
=-1
maxconn
=10

def init_hook
(conduit):
    global 
enablesize,trymirrornum,maxconn
    enablesize 
conduit.confInt('main','enablesize',default=30000)
    
trymirrornum conduit.confInt('main','trymirrornum',default=-1)
    
maxconn conduit.confInt('main','maxconn',default=10)

def predownload_hook(conduit):
    global 
enablesize
    preffermirror
=""
    
for po in (conduit.getDownloadPackages()):        
        if 
hasattr(po'pkgtype') and po.pkgtype == 'local':
            continue
        
totsize long(po.size)
        
ret False
        
if totsize <= enablesize:
            
conduit.info(2"Package %s download size %d less than %d,Skip plugin!"  % (po.repo.id,totsize,enablesize))
            continue
        else:
            
conduit.info(2"Ok,we will try to use axel to download this big file:%d" totsize)
        
local po.localPkg()
        if 
os.path.exists(local):
            if 
not os.path.exists(local+".st"):
                
fstate=os.stat(local)
                if 
totsize == fstate.st_size:
                    
conduit.info(2,"Target already exists,skip to next file!")
                    continue
        
localall "%s %s" % (local,local+".st")
        
rmcmd "rm -f %s" % (localall)
        
curmirroridx 0
        conduit
.info(2,"Before we start,clean all the key files")
        
os.system(rmcmd)
        
connnum totsize enablesize
        
if connnum maxconn:
            
connnum maxconn
        mirrors
=[]
        
mirrors[:0]=po.repo.urls
        
if preffermirror != "":
            
mirrors[:0] = [preffermirror]
        for 
url in mirrors:
            
curmirroridx += 1
            
if (curmirroridx trymirrornum) and (trymirrornum != -1):
                
conduit.info(2"Package %s has tried %d mirrors,Skip plugin!" % (po.repo.id,trymirrornum))
                break
            
remoteurl urljoin(url"i386/%s" po.remote_path)
            
syscmd "axel -a -n %s %s -o %s" % (connnum,remoteurl,local)
            
conduit.info(2"Execute axel cmd:\n%s"  syscmd)
            
os.system(syscmd)
            if 
os.path.exists(local+".st"):
                
conduit.info(2,"axel exit by exception,let's try another mirror")
                continue
            else:
                
ret True
                preffermirror
=url
                
break
        if 
not ret:
            
conduit.info (2,"try to run rm cmd:%s"  rmcmd)
            
os.system(rmcmd
上传的附件
文件类型: gz axelget.tar.gz (1.1 KB, 151 次查看)







__________________
我的邮箱:cnwesleywang@gmail.com
欢迎访问:http://www.wesleywang.cn/

此帖于 07-06-17 13:23 被 wq1977 编辑. 原因: 修正代码中的问题
  wq1977 当前离线   回复时引用此帖
旧 07-06-17, 12:46 第 44 帖
marklf
 
marklf 的头像
 
 
注册会员  
  注册日期: Dec 2006
  帖子: 366
  精华: 1
 

原来代码中地址中缺少的“os/”而非楼主所说的“i386”,故将axelget.py中
引用:
remoteurl = urljoin(url, "i386/%s" % po.remote_path)
改为:
引用:
remoteurl = urljoin(url, "os/%s" % po.remote_path)
后,一切恢复正常!!下载速度飞快!!!!!!!

引用:
Downloading Packages:
Ok,we will try to use axel to download this big file:12229577
Before we start,clean all the key files
Execute axel cmd:
axel -a -n 10 http://distro.ibiblio.org/pub/linux/...2.fc7.i386.rpm -o //var/cache/yum/fedora/packages/azureus-2.5.0.4-2.fc7.i386.rpm
Initializing download: http://distro.ibiblio.org/pub/linux/...2.fc7.i386.rpm
File size: 12229577 bytes
Opening output file //var/cache/yum/fedora/packages/azureus-2.5.0.4-2.fc7.i386.rpm
Starting download

Connection 1 finished ]
Connection 9 finished ]
Connection 8 finished ]
Connection 3 finished ]
Connection 5 finished ]
Connection 6 finished ]
Connection 7 finished ]
Connection 0 finished ]
Connection 2 finished ]
[100%] [..................................................] [ 98.0KB/s] [00:00]

Downloaded 11.7 megabytes in 2:01 seconds. (98.03 KB/s)
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: azureus ######################### [1/1]

Installed: azureus.i386 0:2.5.0.4-2.fc7
Complete!
我注意到新的功能在起作用,我这次下载用了10个连接。

谢谢楼主的贡献!
  marklf 当前离线   回复时引用此帖
旧 07-06-17, 13:19 第 45 帖
亚森罗平 帅哥
 
亚森罗平 的头像
 
 
注册会员  
  注册日期: Jan 2004
  我的住址: 湖南
  帖子: 458
  精华: 0
 

支持,昨晚F7装了使用了,速度飞快!!!
感谢wq1997兄弟写出这么实用的插件!!!







__________________
见世人皆行我欲之事,福也;妄世人皆行我欲之事,祸也!
世人皆求,乱也,世人皆得,治也;得而无伤,修也;勾牵无碍,成也!
  亚森罗平 当前离线   回复时引用此帖
发表新主题 回复


主题工具

发帖规则
您 [不可以] 发表新主题
您 [不可以] 回复主题
您 [不可以] 上传附件
您 [不可以] 编辑您的帖子

已 [启用] BB 代码
已 [启用] 表情符号
已 [禁用] IMG 代码
已 [禁用] HTML 代码
[论坛跳转…]


所有时间均为[北京时间]。现在的时间是 17:07


Powered by vBulletin 版本 3.6.8
版权所有 ©2000 - 2012, Jelsoft Enterprises Ltd.
官方中文技术支持: vBulletin 中文
版权所有 ©2002 - 2011, LinuxSir.Org