yum install git xz gcc g++ gcc-c++
时间: 2023-08-26 19:05:31 浏览: 213
这是一条yum命令,用于安装git、xz、gcc、g++和gcc-c++软件包。在终端窗口中运行以下命令可以安装这些软件包:
```
sudo yum install git xz gcc g++ gcc-c++
```
该命令会自动下载并安装这些软件包及其依赖项。在安装过程中,可能需要输入管理员密码以确认安装。
相关问题
# How to Build libplctag The build system uses CMake to bootstrap a local build. On Linux. On Windows, this makes a Visual Studio project. CMake is also used to create a build on macOS. Note that as of version 2.0.22, pre-built binaries are included in the GitHub releases. # Instructions for Linux ## Install the compilers ### Debian/Ubuntu #### Install Build Essentials, CMake and Git ```text $> sudo apt-get install build-essential cmake git ``` Use your distro-specific instructions to install Clang if you want to use that compiler. ### RHEL/CentOS These instructions probably work with few modifications for Red Hat and Oracle Linux. Please file a GitHub ticket if they need changes for SUSE and other RPM-based distributions. #### Install Compilers, CMake and Git You need to become root or, if your Linux distribution supports it, run these commands with `sudo`. ```text $> yum install gcc gcc-c++ cmake git ```翻译
# 如何构建libplctag
构建系统使用CMake来启动本地构建。在Linux上,它使用CMake创建一个Visual Studio项目。在macOS上也使用CMake来创建构建。
请注意,从版本2.0.22开始,预编译的二进制文件已包含在GitHub发布中。
# Linux的说明
## 安装编译器
### Debian/Ubuntu
#### 安装构建必需品、CMake和Git
```text
$> sudo apt-get install build-essential cmake git
```
如果想使用Clang编译器,请按照特定于您发行版的说明进行安装。
### RHEL/CentOS
这些说明可能需要进行一些修改才能在Red Hat和Oracle Linux上正常工作。如果需要适应SUSE和其他基于RPM的发行版,请提交GitHub工单。
#### 安装编译器、CMake和Git
您需要以root身份登录,或者如果您的Linux发行版支持,则使用`sudo`运行这些命令。
```text
$> yum install gcc gcc-c++ cmake git
```
#!/bin/bash #Author: 柠檬班可优 #Date: 2019-06-06 #install docker in ubuntu and centos function install_docker_in_ubuntu { sudo apt-get update -y # install some tools sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common \ net-tools \ wget -y # install docker curl -fsSL get.docker.com -o get-docker.sh sh get-docker.sh # start docker service sudo groupadd docker &> /dev/null sudo gpasswd -a "${USER}" docker sudo systemctl start docker rm -rf get-docker.sh } function install_docker_in_centos { # install some tools sudo yum install -y git vim gcc glibc-static telnet bridge-utils # install docker curl -fsSL get.docker.com -o get-docker.sh sh get-docker.sh # start docker service sudo groupadd docker &> /dev/null sudo gpasswd -a "${USER}" docker sudo systemctl start docker rm -rf get-docker.sh } SYSTEM_NAME="$(awk -F= '/^NAME/{print $2}' /etc/os-release)" if [[ "${SYSTEM_NAME,,}" =~ "ubuntu" ]] ; then echo "Your system is ubuntu." echo "Installing Docker in ubuntu..." install_docker_in_ubuntu elif [[ "${SYSTEM_NAME,,}" =~ "centos" ]] ; then echo "Your system is centos." echo "Installing Docker in centos..." install_docker_in_centos else echo "This script can only run in ubuntu and centos system." exit 1 fi
这段代码的作用是在 Ubuntu 或者 CentOS 系统中安装 Docker。代码中定义了两个函数 `install_docker_in_ubuntu` 和 `install_docker_in_centos`,分别用来在 Ubuntu 和 CentOS 系统中安装 Docker。在主函数中,通过检查系统名称来确定是在 Ubuntu 还是 CentOS 系统中运行脚本,然后调用相应的安装函数来安装 Docker。
代码的语法看起来没有问题,也没有出现之前提到的语法错误。如果你遇到了问题,可以把出错的信息贴出来,让我来帮你分析一下。
阅读全文
相关推荐
















