Debian Linux以光盘为apt源安装软件包(linux系统).doc_第1页
Debian Linux以光盘为apt源安装软件包(linux系统).doc_第2页
Debian Linux以光盘为apt源安装软件包(linux系统).doc_第3页
Debian Linux以光盘为apt源安装软件包(linux系统).doc_第4页
Debian Linux以光盘为apt源安装软件包(linux系统).doc_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

中国Unix/Linux软件开发联盟 Debian Linux以光盘为apt源安装软件包(linux系统)linux软件开发 debian下以光盘为apt源安装软件包分类: LinuxUnix 2007-07-24 15:12 5361人阅读 评论 (0) 收藏 举报在debian下,用apt方式安装软件除了可以以网络上的资源为源之外,还可以使用本地的资源。下面我就以安装GCC的过程为例,说一下整个过程。平台:debian 4.0 图形界面资源:CD一张 debian-40r0-i386-CD-1.iso刻录的0,增加光盘源使用命令#apt-cdrom add系统会提示将你要添加为源的光盘放入光驱然后enter继续,就自动添加好了1,查看源列表debian - dk: # vim / etc / apt / sources.listdeb cdrom:Debian GNU / Linux 4.0 r0 _Etch_ - Official i386 CD Binary - 1 20070407 - 11 : 55 / etch contrib main2,安装gccdebian - dk: # apt - get install gcc正在读取软件包列表. 完成正在分析软件包的依赖关系树. 完成将会安装下列额外的软件包: gcc - 4.1 libssp0建议安装的软件包: manpages - dev autoconf automake1. 9 libtool flex bison gcc - doc gcc - 4.1 - doc gcc - 4.1 - locales libc6 - dev - amd64 lib64gcc1 lib64ssp0推荐安装的软件包: libc6 - dev libc - dev libmudflap0 - dev下列【新】软件包将被安装: gcc gcc - 4.1 libssp0共升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 0 个软件未被升级 。需要下载 0B / 470kB 的软件包。解压缩后会消耗掉 1401kB 的额外空间。您希望继续执行吗?Y / ny选中了曾被取消选择的软件包 libssp0。(正在读取数据库 . 系统当前总共安装有 52968 个文件和目录。)正在解压缩 libssp0 (从 . / libssp0_4. 1.1 - 21_i386.deb) .选中了曾被取消选择的软件包 gcc - 4.1 。正在解压缩 gcc - 4.1 (从 . / gcc - 4 .1_4. 1.1 - 21_i386.deb) .选中了曾被取消选择的软件包 gcc。正在解压缩 gcc (从 . / gcc_4. 1.1 - 15_i386.deb) .正在设置 libssp0 ( 4.1 . 1 - 21 ) .正在设置 gcc - 4.1 ( 4.1 . 1 - 21 ) .正在设置 gcc ( 4.1 . 1 - 15 ) .3,查看gcc信息,看是否安装好debian - dk: # man gccNo manual entry for gccSee man 7 undocumented for help when manual pages are not available.debian - dk: # lsdebian - dk: # find - name gccdebian - dk: # gcc - helpUsage: gcc options file.Options:- pass - exit - codes Exit with highest error code from a phase- help Display this information- target - help Display target specific command line options (Use -v -help to display command lineoptions of sub - processes)- dumpspecs Display all of the built in spec strings- dumpversion Display the version of the compiler- dumpmachine Display the compiler s target processor- print - search - dirs Display the directories in the compiler s search path- print - libgcc - file - name Display the name of the compiler s companion library- print - file - name = Display the full path to library - print - prog - name = Display the full path to compiler component - print - multi - directory Display the root directory for versions of libgcc- print - multi - lib Display the mapping between command line optionsand multiple library search directories- print - multi - os - directory Display the relative path to OS libraries- Wa, Pass comma - separated on to the assembler- Wp, Pass comma - separated on to the preprocessor- Wl, Pass comma - separated on to the linker- Xassembler Pass on to the assembler- Xpreprocessor Pass on tothe preprocessor- Xlinker Pass on to the linker- combine Pass multiple source files to compiler at once- save - temps Do not delete intermediate files- pipe Use pipes rather than intermediate files- time Time the execution of each subprocess- specs = Override built - in specs with the contents of - std = Assume that the input sources are for - sysroot = Use as the root directory for headersfor headers and libraries- B Add to the compiler s search paths- b Run gcc for target , if installed- V Run gcc version number , if installed- v Display the programs invoked by the compiler- # Like - v but options quoted and commands not executed- E Preprocess only; do not compile, assemble or link- S Compile only; do not assemble or link- c Compile and assemble, but do not link- o Place the output into - x Specify the language of the following input files Permissible languages include: c c + assembler none none means revert to the default behavior of guessing the language based on the file s extensionOptions starting with - g, - f, - m, - O, - W, or - param are automatically passed on to the various sub - processesinvoked by gcc. In order to pass other options on to these processes the - W options must be used.For bug reporting instructions, please see:.For Debian GNU / Linux specific bug reporting instructions, please see:图 .4,ok,写个helloworld试试gccdebian - dk: # lsdebian - dk: # vim hello.cdebian - dk: # gcc - o hello hello.chello.c: 1 : 19 : error: stdio.h: 没有那个文件或目录hello.c: In function main:hello.c: 4 : warning: incompatible implicit declaration of built - in function printf出问题了,找不到stdio.h,那是因为没装库,装上libc6-dev就行了,往下走5,安装libc库debian - dk: # apt - get install libc - dev正在读取软件包列表. 完成正在分析软件包的依赖关系树. 完成注意,我选了 libc6 - dev 而非 libc - dev将会安装下列额外的软件包: libc6 - dev linux - kernel - headers建议安装的软件包: glibc - doc manpages - dev下列【新】软件包将被安装: libc6 - dev linux - kernel - headers共升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。需要下载 0B / 4591kB 的软件包。解压缩后会消耗掉 22 .2MB 的额外空间。您希望继续执行吗?Y / ny选中了曾被取消选择的软件包 linux - kernel - headers。(正在读取数据库 . 系统当前总共安装有 53056 个文件和目录。)正在解压缩 linux - kernel - headers (从. / linux - kernel - headers_2. 6.18 - 7_i386.deb) .选中了曾被取消选择的软件包 libc6 - dev。正在解压缩 libc6 - dev (从 . / libc6 - dev_2. 3.6 .ds1 - 13_i386.deb) .正在设置 linux - kernel - headers ( 2.6 . 18 - 7 ) .正在设置 libc6 - dev ( 2.3 . 6 .ds1 - 13 ) .6,ok装好了,再来看看hellow

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论