怎么将自己开发好的软件上传到ubuntu 11.10软件源里面,求高人指教。

最近在ubuntu群里有人提出任何添加软件源的问题,其实网上有很多添加源的文章,本站有类似的文章,在这里我在将一下如何添加源,ubuntu添加源有两种方式: 一、是最常见的添加源的方式,就是使用命令,这种方式可以一次性添加很多源,很方便: 1 首先备份源列表: sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup 2 而后用gedit或其他编辑器打开: sudo gedit /etc/apt/sources.list 可我遇到有些初学者在运行命令后terminal提示找不到 gedit 这个命令,那就是系统默认没有安装gedit(尽管这种情况很少发生),解决办法 安装gedit#sudo apt-get install gedit 或者选择其他的文字编辑器,如vim、pico等 3 从网上选择合适的源,加入到文件中: 注意:一定要选对版本 4 然后,刷新列表: sudo apt-get update 注意:一定要执行刷新 二、。也许你会问这么多的源哪个才适合自己呢?一是根据自己的网络情况,看自己是电信的还是网通的抑或是其他的&&实在弄不清楚可以资讯当地的网络提供商 另外我要介绍的是apt-spy这个软件,它可以自动为你找到适合自己的源(spy可是间谍的意思哦。) #dpkg -l apt-spy 查看系统是否已安装apt-spy ,若未安装请到http://packages.debian.org/zh-cn/lenny/apt-spy 下载 以下讲讲apt-spy的使用方法 apt-spy使用方法: apt-spy [options] 选项: -d distribution 选择 debian 的发行版本,例如 stable 。除升级外,必须使用此参数。 -a area 选择进行测试的区域,例如 Aisa 。 -c config 指定配置文件。 -e number 指定测试的服务器数量。 -f file 测试时抓取制定的文件(文件相对 debian base 的路径)。 -i file 指定输入的文件,配合 -w 参数使用。 -m mirror-list 指定要升级的镜像列表文件。 -o output-file 重定向输出到指定文件。 -p proxy 指定使用的代理服务器,需要遵从 [server]:[port] 的格式。 -s country_list 指定要进行测试的国家。不能和 -a 参数同时使用。 -t time 指定进行测试时每台服务器的超时时间,只能是正整数。 -u update-URL 从指定的 URL 获得镜像列表更新。 -w file 输出 -i 参数提供的服务器列表中速度最快的前几台镜像服务器(缺省是前 5 台)。 -n number 制定 -w 参数输出的服务器数量。 -v 输出版本信息。 -h 输出当前帮助信息 update 升级镜像站点列表。 用例: 在亚洲区寻找速度最快的testing版镜像(每台服务器的超时时间20秒),并生成 sources.list文件 apt-spy -d testing -t 20 -A Asia 三、图形界面添加源,这种方式适合于初学者,容易掌握 如图所示步骤:系统/系统管理/软件源 还可以将光盘作为源 点击看大图 最后附上一些常用的源列表: 99.com更新服务器(江苏省常州市电信,推荐电信用户使用): deb 99.com/ubuntu/ hardy main restricted universe multiverse deb 99.com/ubuntu/ hardy-security main restricted universe multiverse deb 99.com/ubuntu/ hardy-updates main restricted universe multiverse deb 99.com/ubuntu/ hardy-proposed main restricted universe multiverse deb 99.com/ubuntu/ hardy-backports main restricted universe multiverse deb-src 99.com/ubuntu/ hardy main restricted universe multiverse deb-src 99.com/ubuntu/ hardy-security main restricted universe multiverse deb-src 99.com/ubuntu/ hardy-updates main restricted universe multiverse deb-src 99.com/ubuntu/ hardy-proposed main restricted universe multiverse deb-src 99.com/ubuntu/ hardy-backports main restricted universe multiverse 更新服务器(欧洲,此为官方源,电信网通用户使用): deb /ubuntu/ hardy main restricted universe multiverse deb /ubuntu/ hardy-security main restricted universe multiverse deb /ubuntu/ hardy-updates main restricted universe multiverse deb /ubuntu/ hardy-proposed main restricted universe multiverse deb /ubuntu/ hardy-backports main restricted universe multiverse deb-src /ubuntu/ hardy main restricted universe multiverse deb-src /ubuntu/ hardy-security main restricted universe multiverse deb-src /ubuntu/ hardy-updates main restricted universe multiverse deb-src /ubuntu/ hardy-proposed main restricted universe multiverse deb-src /ubuntu/ hardy-backports main restricted universe multiverse Mirrors.shlug.org更新服务器(电信服务器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group): deb http://cn./ubuntu hardy main restricted universe multiverse deb http://cn./ubuntu hardy-security main restricted universe multiverse deb http://cn./ubuntu hardy-updates main restricted universe multiverse deb http://cn./ubuntu hardy-backports main restricted universe multiverse deb http://cn./ubuntu hardy-proposed main restricted universe multiverse deb-src http://cn./ubuntu hardy main restricted universe multiverse deb-src http://cn./ubuntu hardy-security main restricted universe multiverse deb-src http://cn./ubuntu hardy-updates main restricted universe multiverse deb-src http://cn./ubuntu hardy-backports main restricted universe multiverse deb-src http://cn./ubuntu hardy-proposed main restricted universe multiverse 更新服务器(浙江省杭州市双线服务器): deb /ubuntu hardy main restricted universe multiverse deb /ubuntu hardy-security main restricted universe multiverse deb /ubuntu hardy-updates main restricted universe multiverse deb /ubuntu hardy-backports main restricted universe multiverse deb /ubuntu hardy-proposed main restricted universe multiverse deb-src /ubuntu hardy main restricted universe multiverse deb-src /ubuntu hardy-security main restricted universe multiverse deb-src /ubuntu hardy-updates main restricted universe multiverse deb-src /ubuntu hardy-backports main restricted universe multiverse deb-src /ubuntu hardy-proposed main restricted universe multiverse 厦门大学更新服务器(教育网服务器): deb /ubuntu/ hardy main restricted universe multiverse deb /ubuntu/ hardy-backports restricted universe multiverse deb /ubuntu/ hardy-proposed main restricted universe multiverse deb /ubuntu/ hardy-security main restricted universe multiverse deb /ubuntu/ hardy-updates main restricted universe multiverse deb-src /ubuntu/ hardy main restricted universe multiverse deb-src /ubuntu/ hardy-backports main restricted universe multiverse deb-src /ubuntu/ hardy-proposed main restricted universe multiverse deb-src /ubuntu/ hardy-security main restricted universe multiverse deb-src /ubuntu/ hardy-updates main restricted universe multiverse 成都市 电子科技大学更新服务器(教育网,推荐校园网和网通用户使用): deb http://ubuntu./ubuntu/ hardy main multiverse restricted universe deb http://ubuntu./ubuntu/ hardy-backports main multiverse restricted universe deb http://ubuntu./ubuntu/ hardy-proposed main multiverse restricted universe deb http://ubuntu./ubuntu/ hardy-security main multiverse restricted universe deb http://ubuntu./ubuntu/ hardy-updates main multiverse restricted universe deb-src http://ubuntu./ubuntu/ hardy main multiverse restricted universe deb-src http://ubuntu./ubuntu/ hardy-backports main multiverse restricted universe deb-src http://ubuntu./ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://ubuntu./ubuntu/ hardy-security main multiverse restricted universe deb-src http://ubuntu./ubuntu/ hardy-updates main multiverse restricted universe == 如果无法解析域名,请使用以下地址 == deb http://ubuntu.dormforce.net/ubuntu/ hardy main multiverse restricted universe deb http://ubuntu.dormforce.net/ubuntu/ hardy-backports main multiverse restricted universe deb http://ubuntu.dormforce.net/ubuntu/ hardy-proposed main multiverse restricted universe deb http://ubuntu.dormforce.net/ubuntu/ hardy-security main multiverse restricted universe deb http://ubuntu.dormforce.net/ubuntu/ hardy-updates main multiverse restricted universe deb-src http://ubuntu.dormforce.net/ubuntu/ hardy main multiverse restricted universe deb-src http://ubuntu.dormforce.net/ubuntu/ hardy-backports main multiverse restricted universe deb-src http://ubuntu.dormforce.net/ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://ubuntu.dormforce.net/ubuntu/ hardy-security main multiverse restricted universe deb-src http://ubuntu.dormforce.net/ubuntu/ hardy-updates main multiverse restricted universe 上海市上海交通大学更新服务器(教育网,推荐校园网和网通用户使用): deb http://ftp./ubuntu/ hardy main multiverse restricted universe deb http://ftp./ubuntu/ hardy-backports main multiverse restricted universe deb http://ftp./ubuntu/ hardy-proposed main multiverse restricted universe deb http://ftp./ubuntu/ hardy-security main multiverse restricted universe deb http://ftp./ubuntu/ hardy-updates main multiverse restricted universe deb-src http://ftp./ubuntu/ hardy main multiverse restricted universe deb-src http://ftp./ubuntu/ hardy-backports main multiverse restricted universe deb-src http://ftp./ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://ftp./ubuntu/ hardy-security main multiverse restricted universe deb-src http://ftp./ubuntu/ hardy-updates main multiverse restricted universe 中国科学技术大学更新服务器(教育网,推荐校园网和网通用户使用): deb http://debian./ubuntu/ hardy main multiverse restricted universe deb http://debian./ubuntu/ hardy-backports main multiverse restricted universe deb http://debian./ubuntu/ hardy-proposed main multiverse restricted universe deb http://debian./ubuntu/ hardy-security main multiverse restricted universe deb http://debian./ubuntu/ hardy-updates main multiverse restricted universe deb-src http://debian./ubuntu/ hardy main multiverse restricted universe deb-src http://debian./ubuntu/ hardy-backports main multiverse restricted universe deb-src http://debian./ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://debian./ubuntu/ hardy-security main multiverse restricted universe deb-src http://debian./ubuntu/ hardy-updates main multiverse restricted universe 北京市清华大学更新服务器(教育网,推荐校园网和网通用户使用): deb http://mirror9.net9.org/ubuntu/ hardy main multiverse restricted universe deb http://mirror9.net9.org/ubuntu/ hardy-backports main multiverse restricted universe deb http://mirror9.net9.org/ubuntu/ hardy-proposed main multiverse restricted universe deb http://mirror9.net9.org/ubuntu/ hardy-security main multiverse restricted universe deb http://mirror9.net9.org/ubuntu/ hardy-updates main multiverse restricted universe deb-src http://mirror9.net9.org/ubuntu/ hardy main multiverse restricted universe deb-src http://mirror9.net9.org/ubuntu/ hardy-backports main multiverse restricted universe deb-src http://mirror9.net9.org/ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://mirror9.net9.org/ubuntu/ hardy-security main multiverse restricted universe deb-src http://mirror9.net9.org/ubuntu/ hardy-updates main multiverse restricted universe 沈阳市东北大学更新服务器(教育网,推荐校园网和网通用户使用): deb ftp://ftp./mirror//ubuntu/ hardy main multiverse restricted universe deb ftp://ftp./mirror//ubuntu/ hardy-backports main multiverse restricted universe deb ftp://ftp./mirror//ubuntu/ hardy-proposed main multiverse restricted universe deb ftp://ftp./mirror//ubuntu/ hardy-security main multiverse restricted universe deb ftp://ftp./mirror//ubuntu/ hardy-updates main multiverse restricted universe deb-src ftp://ftp./mirror//ubuntu/ hardy main multiverse restricted universe deb-src ftp://ftp./mirror//ubuntu/ hardy-backports main multiverse restricted universe deb-src ftp://ftp./mirror//ubuntu/ hardy-proposed main multiverse restricted universe deb-src ftp://ftp./mirror//ubuntu/ hardy-security main multiverse restricted universe deb-src ftp://ftp./mirror//ubuntu/ hardy-updates main multiverse restricted universe 中国台湾 台湾大学更新服务器(推荐网通用户使用,电信PING平均响应速度41MS。强烈推荐此源,比较完整,较少出现同步问题): deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main restricted universe multiverse Mirror.vmmatrix.net更新服务器(上海市电信,推荐电信网通用户使用): deb http://mirror.vmmatrix.net/ubuntu/ hardy main restricted universe multiverse deb-src http://mirror.vmmatrix.net/ubuntu/ hardy main restricted universe multiverse deb http://mirror.vmmatrix.net/ubuntu/ hardy-updates main restricted universe multiverse deb-src http://mirror.vmmatrix.net/ubuntu/ hardy-updates main restricted universe multiverse deb http://mirror.vmmatrix.net/ubuntu/ hardy-backports main restricted universe multiverse deb-src http://mirror.vmmatrix.net/ubuntu/ hardy-backports main restricted universe multiverse deb http://mirror.vmmatrix.net/ubuntu/ hardy-security main restricted universe multiverse deb-src http://mirror.vmmatrix.net/ubuntu/ hardy-security main restricted universe multiverse deb http://mirror.vmmatrix.net/ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://mirror.vmmatrix.net/ubuntu/ hardy-proposed main restricted universe multiverse site.org更新服务器(福建省福州市 电信): deb site.org/ubuntu/ hardy main restricted universe multiverse deb-src site.org/ubuntu/ hardy main restricted universe multiverse deb site.org/ubuntu/ hardy-updates main restricted universe multiverse deb-src site.org/ubuntu/ hardy-updates main restricted universe multiverse deb site.org/ubuntu/ hardy-backports main restricted universe multiverse deb-src site.org/ubuntu/ hardy-backports main restricted universe multiverse deb site.org/ubuntu/ hardy-security main restricted universe multiverse deb-src site.org/ubuntu/ hardy-security main restricted universe multiverse deb site.org/ubuntu/ hardy-proposed main multiverse restricted universe deb-src site.org/ubuntu/ hardy-proposed main restricted universe multiverse mirror.rootguide.org更新服务器(上海市 电信): deb http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse deb-src http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse deb http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse deb-src http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse deb http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse deb-src http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse deb http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse deb-src http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse deb http://mirror.rootguide.org/ubuntu/ hardy-proposed main multiverse restricted universe deb-src http://mirror.rootguide.org/ubuntu/ hardy-proposed main restricted universe multiverse deb http://mirror.rootguide.org/ubuntu-cn/ hardy main restricted universe multiverse 台湾的官方源速度也相当不错,有时甚至快于内地的: deb http://tw./ubuntu hardy main restricted universe multiverse deb http://tw./ubuntu hardy-security main restricted universe multiverse deb http://tw./ubuntu hardy-updates main restricted universe multiverse deb http://tw./ubuntu hardy-backports main restricted universe multiverse deb http://tw./ubuntu hardy-proposed main restricted universe multiverse deb-src http://tw./ubuntu hardy main restricted universe multiverse deb-src http://tw./ubuntu hardy-security main restricted universe multiverse deb-src http://tw./ubuntu hardy-updates main restricted universe multiverse deb-src http://tw./ubuntu hardy-backports main restricted universe multiverse deb-src http://tw./ubuntu hardy-proposed main restricted universe multiverse 本站原创文章请注明文章出处:,文章作者:Chinacnd
阅读(...) 评论()ubuntu安装后的第一件事:更新软件源
什么是软件源
软件源指的是通过一定的方式组织,集中放置软件包的地方。很多的应用软件都可以在软件源当中找到。软件源可以是网络服务器,是光盘,甚至是硬盘上的一个目
录。作为 debian 系的 ubuntu ,继承了debian 的 deb 和 apt
系统,只要设定好软件源,就能很方便的安装软件了。
世界各地都有 Ubuntu 的软件源服务器,系统中有一个源列表,用于存放这些服务器的位置。用户也可以自行修改源列表。
软件源的配置文件位置
Ubuntu 的软件源列表存放在 /etc/apt/sources.list 当中。
软件源的一般格式
feisty main
软件源的第一次设置:
刚装好 Ubuntu 的时候,还是半英文的界面。选择主菜单里的
System-&Administration-&Software Source ,即可打开软件源设置界面。
首先,让我们把5个选项都选上,这些代表了官方源的不同内容。
然後,我们选择更新服务器。在“download from”後面的下拉框中,选择中国的服务器(server for
也可以选择 other(其他服务器),然後单击 Select Best Server ,ubuntu
会自动帮你选择最快的源,完成後单击 Choose Server 就可以了。
接着,让我们把 Installable from CD_ROM/DVD 底下的两个框去掉(如果你用的是 DVD
安装,可以不去掉),这样就不用每次都放光盘进去了。
设置完成後,单击 Apply,系统会提示你是否要刷新源,单击“Reload”,Ubuntu
就会从指定的软件源中重新下载软件包列表。
软件源的设置方法:
安装好语言支持的话,菜单变成了中文,软件源的位置是:系统-&系统管理-&软件源
首先是官方源的设置,和上面英文版的一样。
第三方软件源:
有不少软件为 Ubuntu 设置了专门的安装/更新源,还有不少第三方的源,都可以通过 “第三方软件源”来设置。 单击
Add,输入源的地址,
比如 “deb
main”,就可以了。
如果输入错了,可以单击 Edit 编辑。
如果暂时不想用某个源了,去掉它前面的勾选即可。
如果将来再也不会用到某个源,你可以单击“删除”将其去掉。
身份验证:
有时候,你会看到别人在叫你添加源後,还会给你一段命令,类似于:wget -q
sudo apt-key add - 这个形式的。
这时候,你也可以直接把
下载回来,用“软件源”的“导入密钥文件”导入就可以了。这个文件是用来验证软件包的签名的。
让系统自动帮你找到连接最快的源:
在GNOME下,打开开始菜单后依次选择“系统”-&“系统管理”-&“软件源”後,在“Ubuntu软件”的标签下可以看到有个“下载自”的选项。点击後选择“其他”,然后在弹出的新窗口中选择“选择最佳服务器”。
这时 Ubuntu 会尝试连接所有的源服务器,并找出连接速度最快的那一个。用户只要等待进度条走完後选择“选择服务器”即可。
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。sources.list作用的总结
Ubuntu中软件更新的源服务器地址存储再/etc/apt/soures.list中。文件中的内容如下:
trusty main restricted universe multiverse
trusty-security main restricted universe multiverse
trusty-updates main restricted universe multiverse
trusty-proposed main restricted universe multiverse
trusty-backports main restricted universe multiverse
trusty main restricted universe multiverse
trusty-security main restricted universe multiverse
trusty-updates main restricted universe multiverse
trusty-proposed main restricted universe multiverse
trusty-backports main restricted universe multiverse
上面是ubuntu官方的软件源。具体含义如下,
每一行的开头是deb和deb-src,表示直接通过.deb文件或者源文件的方式来进行安装;
第二字段,即deb和deb-src字段后是一段URL,这是软件源的地址
第三字段,即URL后的字段,是再URL路径中的dists目录下对应的文件夹,如图所示
第四~七字段都是第三字段对应的目录下的子目录
但是由于ubuntu的官方软件源下载速度慢而且有些第三方软件的安装包过于陈旧,已不能满足用户的需求。因此需要添加第三方软件更新源。本文以163的软件源为例讲述更新软件源的方法。
更新sources.list
在网上能够很方便的查到163的ubuntu的软件源的方法,sudo gedit /etc/apt/source.list,再打开的文件中添加如下内容:
raring main restricted universe multiverse
raring-security main restricted universe multiverse
raring-updates main restricted universe multiverse
raring-proposed main restricted universe multiverse
raring-backports main restricted universe multiverse
raring main restricted universe multiverse
raring-security main restricted universe multiverse
raring-updates main restricted universe multiverse
raring-proposed main restricted universe multiverse
raring-backports main restricted universe multiverse
保存退出后运行命令:sudo apt-get update。
但是,这样修改后会在更新软件时会出现404 not found的错误,这是由于对于ubuntu各个版本的软件位置是不一样的,因此,需要根据ubuntu的版本号来选择对应的软件源路径。
选择对应版本的软件源
ubuntu各版本的名称如下
Vivid Vervet
Utopic Unicorn
Trusty Tahr
Saucy Salamander
Raring Ringtail
Quantal Quetzal
Precise Pangolin
Oneiric Ocelot
由于我的ubuntu版本是14.04所以需要将上面的内容修改为:
trusty main restricted universe multiverse
trusty-security main restricted universe multiverse
trusty-updates main restricted universe multiverse
trusty-proposed main restricted universe multiverse
trusty-backports main restricted universe multiverse
trusty main restricted universe multiverse
trusty-security main restricted universe multiverse
trusty-updates main restricted universe multiverse
trusty-proposed main restricted universe multiverse
trusty-backports main restricted universe multiverse
然后再次保存,sudo apt-get update
保存sources.list,sudo cp /etc/apt/sources.list
/etc/apt/sources.list-
打开sources.list,sudo gedit /etc/apt/sources.
将需要更新的软件源复制到文档中;
根据ubuntu的版本将每行的第三个字段换成对应版本的名称;
保存文档,并退出;
刷新软件源,sudo apt-get update
参考资料:
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:3808次
排名:千里之外
原创:10篇
(1)(1)(2)(1)(1)(1)(1)(1)(1)(2)(1)

我要回帖

更多关于 ubuntu 的文章

 

随机推荐