请问,我怎么获得软件包的原代码?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
Georock
帖子: 51
注册时间: 2005-07-13 10:15
来自: shenzhen

请问,我怎么获得软件包的原代码?

#1

帖子 Georock » 2005-10-26 10:10

我用sudo apt-get install 了tochnog,我想获得tochnog的原码,我该怎么做?谢谢。
我的sources.list是

deb http://archive.ubuntu.org.cn/ubuntu breezy main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu breezy-security main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu breezy-updates main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu-cn ubuntu.org.cn main universe multiverse restricted
头像
leal
帖子: 1119
注册时间: 2005-08-29 14:49
来自: 杭州
联系:

#2

帖子 leal » 2005-10-26 11:11

加 deb-src 源地址
用心×恒 | 豆瓣 | 门户 | Blog
BIN
帖子: 91
注册时间: 2005-05-20 13:49

#3

帖子 BIN » 2005-10-26 11:29

添加源地址后用命令:apt-get source packagename
Georock
帖子: 51
注册时间: 2005-07-13 10:15
来自: shenzhen

#4

帖子 Georock » 2005-10-26 15:01

谢谢,我现在 把 sources.list 改成 了:
deb http://archive.ubuntu.org.cn/ubuntu breezy main restricted universe multiverse
deb-src http://archive.ubuntu.org.cn/ubuntu breezy main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu breezy-security main restricted universe multiverse
deb-src http://archive.ubuntu.org.cn/ubuntu breezy-security main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu breezy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.org.cn/ubuntu breezy-updates main restricted universe multiverse
但还是下载不了tochnog的源代码:
"无法下载 http://archive.ubuntu.org.cn/ubuntu/dis ... Sources.gz MD5 校验和不符
正在读取软件包列表... 完成
E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。
wzp@ubuntu:~$ sudo apt-get source tochnog
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
E: 无法打开文件 /var/lib/apt/lists/archive.ubuntu.org.cn_ubuntu_dists_breezy-security_universe_source_Sources - open (2 没有那个文件或目录)"

我改sources.list 后用了sudo apt-get update 了。
头像
leal
帖子: 1119
注册时间: 2005-08-29 14:49
来自: 杭州
联系:

#5

帖子 leal » 2005-10-26 15:02

确定源里有? 不行用google上其主页下吧 又不是什么难事
用心×恒 | 豆瓣 | 门户 | Blog
Georock
帖子: 51
注册时间: 2005-07-13 10:15
来自: shenzhen

#6

帖子 Georock » 2005-10-26 15:31

从源里安装了可执行文件,会有对应的源代码吗?
从主页上下的自己编译不能通过。
谢谢。
头像
leal
帖子: 1119
注册时间: 2005-08-29 14:49
来自: 杭州
联系:

#7

帖子 leal » 2005-10-26 15:54

首先,自己编译不能通过不一定是源码本身的问题;
另,如果不是官方维护的软件包不一定有对应的源码;

三,软件本身的用户手册和帮助 要仔细看看先
用心×恒 | 豆瓣 | 门户 | Blog
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#8

帖子 oneleaf » 2005-10-26 15:59

Georock 写了:谢谢,我现在 把 sources.list 改成 了:
deb http://archive.ubuntu.org.cn/ubuntu breezy main restricted universe multiverse
deb-src http://archive.ubuntu.org.cn/ubuntu breezy main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu breezy-security main restricted universe multiverse
deb-src http://archive.ubuntu.org.cn/ubuntu breezy-security main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu breezy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.org.cn/ubuntu breezy-updates main restricted universe multiverse
但还是下载不了tochnog的源代码:
"无法下载 http://archive.ubuntu.org.cn/ubuntu/dis ... Sources.gz MD5 校验和不符
正在读取软件包列表... 完成
E: 有一些索引文件不能下载,它们可能被忽略了,也可能转而使用了旧的索引文件。
wzp@ubuntu:~$ sudo apt-get source tochnog
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
E: 无法打开文件 /var/lib/apt/lists/archive.ubuntu.org.cn_ubuntu_dists_breezy-security_universe_source_Sources - open (2 没有那个文件或目录)"

我改sources.list 后用了sudo apt-get update 了。
由于服务器空间不够完全镜像需要150G,所以取消了源的镜像,因此
deb-src 必须使用 http://archive.ubuntu.com/ubuntu
Georock
帖子: 51
注册时间: 2005-07-13 10:15
来自: shenzhen

#9

帖子 Georock » 2005-10-26 16:54

换了 deb-src http://archive.ubuntu.com/ubuntu 的 源后搞好了,谢谢你们哦.
回复