centos 升级gcc
CentOS 7官方源的gcc最新版本是4.8.5,发布于2015年,年代久远且不支持c++14。要编译c++14及以上项目,必须要升级现有版本或者安装高版本的gcc。
解决办法有两种:手动编译(也可以从其他机器拷贝或者网上下载),或从源安装。
大多数情况下本人都不推荐从源码编译,不仅因为编译过程中常会出现各种依赖问题需要手动解决, ...
如何解决centos7双系统后丢失windows启动项?
windows 7、8/10 安装centos7双系统后,默认会将mbr改写成为grub2,而默认的centos7不识别windows 的ntfs分区,所以启动项没有windows。 下面随小编一起去看看解决centos7双系统后丢失windows启动项的方法吧!
可以用3条命令,即可将windows添加到grub2的启动项。
首先保证互联网是通的。
1.yum -y install epel-release ...
centos 联合编译动态连接库详解
么是动态链接库
Windows上是dynamic linklibrary (DLL),后缀?xxx.dll
UNIX或Linux上是Shared Library .后缀是 xxx.so
将文件编译成.so格式的动态链接库
gcc -o libme.so wso.c -shared
将wso.c编译成 libme.so 库名为me
lib so为前缀跟后缀
联合编译
gcc -L /root/myc/ -l me ws.c -o newws
-L ...
CentOS系统中使用yum命令安装redis的方法
在linux CentOS系统中使用yum命令安装redis报错:
[root@localhost install]# yum install redis
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
* base: mirrors.skyshe.cn
* extras: mirrors.163.com
这是因为,centos默认的安装源在官方centos.org上,而Redis在第三方的yu ...
在CentOS上安装Python3的三种方法
Centos7默认自带了Python2.7版本,但是因为项目需要使用Python3.x你可以按照此文的三个方法进行安装.
注:本文示例安装版本为Python3.5,
一、Python源代码编译安装
安装必要工具 yum-utils ,它的功能是管理repository及扩展包的工具 (主要是针对repository)
$ sudo yum install yum-utils
使用yum-builddep为Python3构建 ...
centos系统上部署安装minio - 指南
pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", monospace !important; font-size: 14px !important; line-height: 1.6 !important; padding: 16px !important; margin: 16px 0 !importan ...
CentOS-Stream 9更换国内(阿里)yum源
1 CentOS9操作系统yum源路径
CentOS9操作系统yum源配置文件主要有两个,分别是centos.repo和centos-addons.repo
centos.repo 配置文件是 CentOS 系统中用于配置 yum 软件仓库(repository)的文件。这个文件定义了 yum 从哪些 URL 地址获取软件包。
路径:/etc/yum.repos.d/centos.repo
centos-addons.repo 配置文件是 Cent ...
centos停服,迁移centos7.3系统到新搭建的openEuler
背景
最近在做的事,简单来讲,就是一套系统差不多有10多台虚拟机,都是centos系统,版本主要是7.3、7.6、7.9,现在centos停止维护了,转为了centos stream,而centos stream的定位是:Red Hat Enterprise Linux (RHEL) 开发之前持续交付的发行版,作为rhel的上游,更新迭代比较频繁,不稳定,对于生产系统来说是无法接受的 ...
CentOS-7离线安装openssl-devel
1、下载相关安装包
keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm 快速下载地址:https://vault.centos.org/7.9.2009/os/x86_64/Packages/keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm
krb5-devel-1.15.1-50.el7.x86_64.rpm 快速下载地址:https://vault.centos.org/7.9.2009/os/x86_64/Packages/krb5-devel-1.15.1-50.e ...
CentOS-7离线安装gcc
1、下载相关安装包
bzip2-devel-1.0.6-12.el7.x86_64.rpm 快速下载地址:https://vault.centos.org/7.9.2009/os/x86_64/Packages/bzip2-devel-1.0.6-13.el7.i686.rpm
cpp-4.8.5-44.el7.x86_64.rpm 快速下载地址:https://vault.centos.org/7.9.2009/os/x86_64/Packages/cpp-4.8.5-44.el7.x86_64.rpm
gcc-4.8.5-44.el7 ...
Centos7, 使用yum工具,出现 Could not resolve host: mirrorlist.centos.org
在 CentOS 7 中使用 yum 工具时,如果出现 "Could not resolve host: mirrorlist.centos.org" 的错误,通常是因为默认的镜像源无法访问。以下是一些常用的解决方法:
检查网络连接:首先使用 ping 命令测试网络连接是否正常。如果 ping mirrorlist.centos.org 不通,但 ping www.baidu.com 正常,说明 DNS 解析没问题,基本 ...
主流Linux发行版本区别(CentOS、麒麟、Ubuntu)
1. 基础操作与系统基本配置
操作与指令
CentOS
麒麟
Ubuntu
版本与内核
CentOS 7.9 内核:3.10.0
Kylin v10 sp3 内核:4.19.90
Ubuntu 20.04 lts 内核:5.4.0(20.04 ) 5.15(22.04 )
密码要求
随意
8位并且大写,小写,数字,特殊符号 4种中3种
随意
登录用户
root
root
普通用户,通 ...
Hyper-V 安装 CentOS
Author: ACatSmiling
Since: 2024-09-02
CentOS 安装
ISO 镜像下载
官方网站:https://www.centos.org/
目前,最新版本为 CentOS Stream 9:
本文以 CentOS 7 为例,下载页拉到下面,选择旧版本安装。
Older Versions
Legacy versions of CentOS are no longer supported. For historical purposes, CentOS keeps an ...
CentOS Python 3.12安装
之前从来没想到我会在安装Python这点上卡住,事实上最近就是在一个CentOS测试机上安装Python时遇到了问题,因此记一下。
以往我们使用yum安装python时非常简单:
yum install python
or
yum install python3
最多额外再加装个pip以及python-devel,就算需要某个特定的、yum无法覆盖的小版本,也只需要`configure && make ...
centos 配置或安装国内yum源
前言:
本文先讲述配置yum, 再讲述安装yum,因为一般系统会已经安装有yum了的,除非你的系统yum环境已经无效了的话,可以重新安装;可以直接输入指令yum-回车确认(如下述 安装-第6点)。
一、配置yum
1、查看看是否存在yum
[root@localhost ~]# rpm -qa|grep yum
yum-langpacks-0.4.2-7.el7.noarch
yum-3.4.3-168.el7.cen ...
Centos7报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
一、问题描述
Centos7使用yum命令失效,报错:Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
二、解决方案
查询了好多种方法,有的说是DNS的问题,有的说是防火墙的问题 ...
VirtualBox扩容CentOS-7虚拟机磁盘
1、背景描述
如上图所示,根路径“/”所在的文件系统已没有可用的磁盘空间,需要扩容磁盘。
df -h
2、VirtualBox操作
2.1、查看当前虚拟磁盘的大小
如上图所示,点击打开选中的虚拟机的 Settings 界面。
如上图所示,当前虚拟机的虚拟磁盘大小为 8GB 。
2.2、修改虚拟磁盘的大小
如上图所示,点击“File”->“Virtual ...
CentOS 7 yum无法使用解决方法Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=
公众号本文地址,希望老铁浏览支持
https://mp.weixin.qq.com/s/29iT8kZQMjNoyhCywhqcvA
在centos7中使用yum命令时候报错:
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not res ...
CentOS-7离线安装policycoreutils-python
1、下载相关安装包
policycoreutils-2.5-34.el7.src.rpm 快速下载地址:https://vault.centos.org/7.9.2009/os/x86_64/Packages/policycoreutils-python-2.5-34.el7.x86_64.rpm
audit-libs-python >= 2.1.3-4 快速下载地址:https://vault.centos.org/7.9.2009/os/x86_64/Packages/audit-libs-python-2.8.5-4.el7.x86_6 ...
解决 CentOS 7 官方 yum 仓库无法使用的最佳实践
一、背景介绍
2024 年 7 月 1 日,在编译基于 CentOS 7.6.1810 镜像的 Dockerfile 过程中,执行 yum install 指令时,遇到了错误:Could not resolve host: mirrorlist.centos.org; Unknown error。
特别指出: 编译 Dockerfile 并执行其中的 yum install 指令时,所使用的是正在编译的镜像中的 yum 仓库,非编译机上的。
...