centos7中安装D语言编译器
001、系统
[root@PC1 ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@PC1 ~]#
002、测试D语言编译器
[root@PC1 ~]# dmd
bash: dmd: command not found...
003、下载D语言编译器安装包
官网:https://dlang.org/download.html
[root@PC1 software]# wget https://downloads.dlang.org/releases/2.x/2.103.1/dmd.2.103.1.linux.tar.xz
004、解压
[root@PC1 software]# tar -xf dmd.2.103.1.linux.tar.xz [root@PC1 software]# cd dmd2/ [root@PC1 dmd2]# cd linux/ [root@PC1 linux]# cd bin64/ [root@PC1 bin64]# ls ddemangle dmd dmd.conf dub dustmite rdmd README.TXT
005、测试dmd命令
[root@PC1 bin64]# ls ddemangle dmd dmd.conf dub dustmite rdmd README.TXT [root@PC1 bin64]# ./dmd --version DMD64 D Compiler v2.103.1 Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved written by Walter Bright
006、将命令加入环境变量
[root@PC1 bin64]# ls ddemangle dmd dmd.conf dub dustmite rdmd README.TXT [root@PC1 bin64]# pwd /home/software/dmd2/linux/bin64 [root@PC1 bin64]# echo "export PATH=$PATH:/home/software/dmd2/linux/bin64" >> ~/.bashrc [root@PC1 bin64]# source ~/.bashrc (base) [root@PC1 bin64]# dmd --version DMD64 D Compiler v2.103.1 Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved written by Walter Bright