Linux学习之diction的编译与使用

前言

为了更好的学习Linux系统环境和熟悉Linux指令集,本次学习任务完成diction的安装
环境:Ubuntu18.04
参考资料:编译程序
学习目的:学习ftp、gcc、make等工具以及源码树的构成与编译、安装过程
本文原创,创作不易,转载请注明!!!
本文链接
个人博客:https://ronglin.fun/?p=157
PDF链接:见博客网站
CSDN: https://blog.csdn.net/RongLin02/article/details/114496856

diction的下载

准备工作

准备工作一共就2项:1.确保Ubuntu联网;2.创建一个文件src存放项目源码
着重记录第2项,涉及到的Linux文件操作指令:
在这里插入图片描述
再加一个:“pwd”——查看当前目录
再补充一个:"rm -rf "——强制删除目录
首先,在根目录下创建如下目录:code/gnu/src
在这里插入图片描述

下载diction

目录创建完毕,然后就是连接服务器,下载diction。
输入 “ftp ftp.gnu.org”,用ftp的方式连接
Name 输入 “anonymous” 匿名登录,然后等待一会就会提示 Login successful
在这里插入图片描述
之后我们进入 gnu/diction 目录,下载diction
在这里插入图片描述
当输入"ls"指令时,居然报错了,查阅资料之后才知道,原来是服务器设定为主动模式了,在终端中输入"passive"之后解决
再次输入"ls"查看目录,输入"get diction-1.11.tar.gz" 下载diction。
在这里插入图片描述
等待下载完毕后,输入"quit" 或者 “bye” 断开FTP连接

解压diction

下载完毕之后,它是一个压缩文件,需要解压,输入"tar xzf diction-1.11.tar.gz"解压文件
在这里插入图片描述
解压完成,查看解压目录,至此,diction下载完成

diction的安装

安装需要两个指令:
./configure
make

./configure

“这个 configure 程序是一个 shell 脚本,由源码树提供。它的工作是分析程序构建环境。大多数源码会设计为可移植的。 也就是说,它被设计成能够在不止一种类 Unix 系统中进行构建。但是为了做到这一点,在建立程序期间,为了适应系统之间的差异, 源码可能需要经过轻微的调整。configure 也会检查是否安装了必要的外部工具和组件。”

直接输入 “./configure”,看到报错了,继续查资料,发现 gcc make 没装
在这里插入图片描述
输入 “sudo apt-get install gcc make” 安装gcc和make
安装成功之后 继续输入 “./configure”
在这里插入图片描述
运行 configure 命令。 因为 configure 命令所在的位置不是位于 shell 通常期望程序所呆的地方,我们必须明确地告诉 shell 它的位置,通过 在命令之前加上 ./ 字符,configure 将会输出许多信息。

make

make指令需要Makefile文件,Makefile由上一步的 configure 配置生成
在当前目录输入"make"
在这里插入图片描述
关于 make 的更多用法说明,开头的参考资料有更详细的说明。
输入"sudo make install" 安装
执行了安装后,我们可以检查下程序是否已经可用:
输入"which diction"
在这里插入图片描述安装完成了 =w=

Linux 大全; 按照A~Z区分; A a−Linux a−Linux is an x86 floppy−based mini−distribution, where assembly code meets Linux kernel. It contains only programs written in assembly language. It is extemely small, yet functional, and provides HTTP and FTP services out−of−the−box. Initial version 0.17 was released August 17, 2002. A floppy−based distribution. From LWN Distribution List http://www.tldp.org/LDP/LinuxDictionary/html/index.html a2p Awk to Perl translator From whatis http://www.tldp.org/LDP/LinuxDictionary/html/index.html a2ps GNU a2ps 'Anything to PostScript' converter and pretty−printer a2ps converts files into PostScript for printing or viewing. It uses a nice default format, usually two pages on each physical page, borders surrounding pages, headers with useful information (page number, printing date, file name or supplied header), line numbering, symbol substitution as well as pretty printing for a wide range of programming languages. Historically, a2ps started as a text to PostScript converter, but thanks to powerful delegations it is able to let you use it for any kind of files, ie it can also digest manual pages, dvi files, texinfo, .... Among the other most noticeable features of a2ps are: − various encodings (all the Latins and others), − various fonts (automatic font down loading), − various medias, − various printer interfaces, − various output styles, − various programming languages, − various helping applications, − and various spoken languages. From Debian 3.0r0 APT http://www.tldp.org/LDP/LinuxDictionary/html/index.html a2ps The a2ps filter converts text and other types of files to PostScript format. A2ps has pretty−printing capabilities and includes support for a wide number of programming languages, encodings (ISO Latins, Cyrillic, etc.), and media. From Redhat 8.0 RPM http://www.tldp.org/LDP/LinuxDictionary/html/index.html a52dec Utilities to extract and decode ATCS A/52 streams Utilities to extract and decode ATCS A/52 streams. The A/52 standard is used in a variety of applications, including digital television and DVD. It is also known as AC−3. From Debian 3.0r0 APT http://www.tldp.org/LDP/LinuxDictionary/html/index.html AA Auto Answer (MODEM) From VERA http://www.tldp.org/LDP/LinuxDictionary/html/index.html aa3d An ASCII art stereogram generator This program generates the well known and popular random dot stereograms in ASCII art. From Debian 3.0r0 APT http://www.tldp.org/LDP/LinuxDictionary/html/index.html AAA Authentication, Authorization and Accounting From VERA http://www.tldp.org/LDP/LinuxDictionary/html/index.html AAC Advanced Audio Coding (IIS, MPEG) From VERA http://www.tldp.org/LDP/LinuxDictionary/html/index.html AAC Authorization and Access Control (IETF) From VERA http://www.tldp.org/LDP/LinuxDictionary/html/index.html AAD Authorized AutoCAD Dealer (AutoCAD, CAD) From VERA http://www.tldp.org/LDP/LinuxDictionary/html/index.html A
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值