CentOS 7 下安装Emacs及pymysql

本文介绍了如何在CentOS 7系统中下载安装Emacs编辑器,以及如何为Python3安装pip3和MYSQL驱动,确保导入pymysql模块正常工作。

一、下载安装最新的安装包,并解压。

[root@VM_0_15_centos software]# rpm -qa|grep nettle     查看nettle版本
[root@VM_0_15_centos software]# rpm -e --nodeps nettle  删除旧版本
[root@VM_0_15_centos software]# yum install nettle      安装nettle


[root@VM_0_15_centos software]# rpm -qa|grep gnutls     查看gnutls版本
[root@VM_0_15_centos software]# rpm -e --nodeps gnutls  删除旧版本
[root@VM_0_15_centos software]# yum install gnutls      安装gnutls      

[root@VM_0_15_centos software]# rpm -qa|grep nettle
nettle-2.7.1-8.el7.x86_64
[root@VM_0_15_centos software]# rpm -qa|grep gnutls
gnutls-3.3.29-8.el7.x86_64

[root@VM_0_15_centos software]# yum install emacs
[root@VM_0_15_centos software]# rpm -qa|grep emacs
emacs-24.3-22.el7.x86_64
emacs-filesystem-24.3-22.el7.noarch
emacs-common-24.3-22.el7.x86_64
[root@VM_0_15_centos software]# emacs

完成。

### 安装 Emacs 文本编辑器 #### 使用预构建包安装 Emacs 对于希望快速安装并开始使用的用户,在 CentOS 7 上可以通过 YUM 软件仓库轻松获取 Emacs。为了确保能够访问最新的软件包,建议先配置阿里云的 EPEL 源: ```bash mv /etc/yum.repos.d/CentOS-Base.repo CentOS-Base.repo.bak wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/epel-7.repo yum clean all yum makecache ``` 完成上述设置之后,可以执行如下命令来安装 Emacs[^5]。 ```bash sudo yum install emacs ``` 这将自动处理所有依赖关系,并安装最新可用版本的 Emacs 到系统中。 #### 编译源码安装特定版本的 Emacs 如果需要安装指定版本(例如26.3),可以从官方网站下载对应版本的压缩文件进行编译安装。以下是具体的操作方法: 1. 访问GNU官方FTP站点下载所需版本的 tarball 文件;对于 Emacs 26.3 版本而言,链接可能是 `http://ftp.gnu.org/pub/gnu/emacs/emacs-26.3.tar.gz` 或其他镜像站提供的相同资源。 2. 解压后进入解压目录运行配置脚本以及make指令来进行本地化编译工作: ```bash ./configure --prefix=/usr/local make ``` 3. 执行安装命令以完成整个过程: ```bash sudo make install ``` 此时应该已经在 CentOS 7 中成功部署了所选版本的 Emacs 编辑器[^1]。 一旦安装完毕,无论是哪种方式获得的应用程序都可以直接通过命令行输入 `emacs` 启动该工具[^2]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值