dnf upgrade Repository extras is listed more than once in the configuration CentOS Linux 8 - AppStream 0.0 B/s | 0 B 00:00 Errors during downloading metadata for repository 'appstream': - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container [Could not resolve host: mirrorlist.centos.org] Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container [Could not resolve host: mirrorlist.centos.org]

时间: 2025-08-05 07:09:08 浏览: 3
<think>首先,用户的问题是:“我想解决CentOS 8使用DNF升级时出现的镜像源解析错误 请问CentOS Linux 8 dnf upgrade error Could not resolve host mirrorlist.centos.org”。这看起来是CentOS 8中dnf升级时遇到的DNS解析错误,具体错误是“Could not resolve host mirrorlist.centos.org”。 从系统级指令中,我需要: - 所有行内数学表达式用$...$格式(但这里可能不涉及数学表达式)。 - 独立公式用$$...$$格式(同样,可能不适用)。 - LaTeX语法正确。 - 使用中文回答。 - 生成相关问题。 - 在回答中引用的段落末尾自然地添加引用标识,如[^1]。 用户提供的引用是关于CentOS 7的类似问题,但用户现在问的是CentOS 8,使用dnf而不是yum。CentOS 8默认使用dnf作为包管理器,而CentOS 7使用yum。但错误类似,都是DNS解析问题。 参考引用: - [^1]:提到更新yum报错,并链接到解决方法。 - [^2]:建议修改/etc/resolv.conf添加DNS服务器。 - [^3]:描述yum update错误,包括“Couldn't resolve host 'mirrorlist.centos.org'”。 - [^4]:建议手动设置baseurl在repo文件中。 我需要将这些应用到CentOS 8的dnf问题中。dnf是yum的下一代版本,所以解决方法类似。 回答结构: - 结构清晰,逐步解决问题。 - 使用中文。 - 在末尾生成相关问题。 - 添加引用标识到引用段落末尾。 关键步骤: 1. **检查网络连接**:确保系统可以访问互联网。 2. **检查DNS解析**:使用ping或nslookup测试域名解析。 3. **修改DNS设置**:编辑/etc/resolv.conf添加公共DNS如8.8.8.8。 4. **检查repo文件**:CentOS 8的repo文件可能在/etc/yum.repos.d/,但dnf使用相同的配置文件。 5. **手动设置镜像源**:如果自动镜像列表失败,手动设置baseurl。 6. **更新dnf配置**:确保repo文件正确。 CentOS 8特定点: - CentOS 8使用dnf,但配置文件类似。 - 镜像源可能不同;CentOS 8已经EOL,但用户可能还在使用。 用户提到“CentOS Linux 8”,需要注意CentOS 8在2021年结束支持,但用户可能还在尝试使用。 回答步骤: 1. 确认问题:描述错误。 2. 逐步解决方案: a. 测试网络连接。 b. 测试DNS解析。 c. 修改DNS设置。 d. 检查并修改repo文件。 e. 手动设置baseurl。 3. 提供命令示例。 4. 结束建议。 5. 生成相关问题。 添加引用: - 当引用提供的引用时,在段落末尾添加[^1], [^2], 等。 - 例如,提到修改/etc/resolv.conf时,引用[^2]。 生成相关问题: - 在回答末尾,添加“§§相关问题§§”部分,列出2-3个相关问题。 完整回答结构: - 开头:解释问题。 - 步骤1:检查网络。 - 步骤2:检查DNS。 - 步骤3:修改DNS设置(引用[^2])。 - 步骤4:检查repo文件(引用[^4])。 - 步骤5:手动设置baseurl。 - 步骤6:测试dnf命令。 - 结尾:如果问题持续,建议其他方案。 - 相关问题。 使用中文。</think>### 解决CentOS 8使用DNF升级时的镜像源解析错误 您遇到的错误“Could not resolve host mirrorlist.centos.org”表明系统在尝试访问CentOS镜像源时出现了DNS解析问题。这通常是由于网络配置、DNS设置或镜像源不可用导致的(CentOS 8已于2021年结束支持,官方镜像可能已迁移)。以下是结构化的解决步骤,基于类似问题的通用方案[^2][^4]。请逐步操作,并在终端中以root权限执行命令。 #### 步骤1: 检查网络连接和DNS解析 首先,确认系统能访问互联网和解析域名。 - **测试网络连接**: 运行 `ping -c 4 google.com`。如果无响应,检查网络设置(如IP地址、网关)。例如: ```bash ping -c 4 google.com ``` 如果输出显示“unknown host”或超时,说明网络配置有问题。需修复网络接口(如使用 `nmcli` 或编辑 `/etc/sysconfig/network-scripts/ifcfg-eth0`)。 - **测试DNS解析**: 运行 `nslookup mirrorlist.centos.org` 或 `dig mirrorlist.centos.org`。如果失败,表明DNS服务不可用。例如: ```bash nslookup mirrorlist.centos.org ``` 如果输出“could not resolve host”,则需修改DNS设置。 #### 步骤2: 修改DNS设置 编辑DNS配置文件添加可靠的公共DNS服务器(如Google DNS 8.8.8.8)。这是常见解决方案[^2]。 1. 打开配置文件: ```bash sudo vi /etc/resolv.conf ``` 2. 添加或修改以下内容(确保文件开头有 `nameserver` 行): ```plaintext nameserver 8.8.8.8 nameserver 8.8.4.4 nameserver 202.106.0.20 # 备用中国DNS ``` 3. 保存并退出(按 `Esc` 后输入 `:wq`)。 4. 重启网络服务: ```bash sudo systemctl restart NetworkManager ``` 或使用 `sudo nmcli networking off && sudo nmcli networking on`。 重新测试DNS解析(`nslookup mirrorlist.centos.org`),应能成功解析IP地址[^2]。 #### 步骤3: 检查并修改DNF仓库配置 如果DNS修复后问题仍存在,可能是CentOS 8镜像源已失效(因EOL)。手动设置仓库的 `baseurl` 代替自动镜像列表[^4]。 1. 备份当前仓库文件: ```bash sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak ``` 2. 编辑仓库文件(CentOS 8常用文件为 `CentOS-Linux-BaseOS.repo` 或 `CentOS-Linux-AppStream.repo`): ```bash sudo vi /etc/yum.repos.d/CentOS-Linux-BaseOS.repo ``` 3. 找到 `[baseos]` 部分,注释掉 `mirrorlist` 行,并添加有效的 `baseurl`。例如,使用阿里云镜像(CentOS 8的Vault源): ```plaintext [baseos] name=CentOS Linux $releasever - BaseOS # 注释掉原mirrorlist行 # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS baseurl=https://vault.centos.org/8.5.2111/BaseOS/$basearch/os/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial ``` 类似地,修改 `[appstream]` 部分。其他可靠镜像包括: - 腾讯云:`baseurl=http://mirrors.tencentyun.com/centos-vault/8.5.2111/BaseOS/$basearch/os/` - 华为云:`baseurl=https://repo.huaweicloud.com/centos-vault/8.5.2111/BaseOS/$basearch/os/` 4. 保存文件,清理缓存并测试DNF: ```bash sudo dnf clean all sudo dnf makecache sudo dnf upgrade ``` 如果成功,输出应显示包更新进度[^4]。 #### 步骤4: 其他方案 - **临时禁用IPv6**:如果DNS问题与IPv6相关,编辑 `/etc/sysctl.conf` 添加 `net.ipv6.conf.all.disable_ipv6=1`,然后运行 `sudo sysctl -p`。 - **使用代理**:如果网络受限,配置代理: ```bash echo "proxy=http://your-proxy-ip:port" | sudo tee -a /etc/dnf/dnf.conf ``` - **升级到替代系统**:CentOS 8已EOL,建议迁移到CentOS Stream、Rocky Linux或AlmaLinux以避免类似问题。 #### 总结 以上步骤覆盖了常见修复方法。首先优先修改DNS(步骤2),若无效则手动设置仓库源(步骤3)。如果问题持续,检查防火墙(`sudo firewall-cmd --state`)或联系网络管理员。注意,由于CentOS 8官方支持结束,使用社区镜像源是推荐方案[^1][^3]。
阅读全文

相关推荐

#! /bin/bash function ascend_git_mm_init { echo "0:Main Branch(Default, Onetrack, br_hisi_trunk_ai)" echo "1:David Kernel Version 6.6" echo "2:David Kernel Version 5.10" echo "3:David Chip BVersion" echo "4:David Chip BVersion 510" echo "5:David Chip BVersion 600" echo "6:David Chip BVersion 610" echo "7:New Main Branch(Chip BVersion 610: br_bbit_torino_v100r001c10_protype_20240410)" echo "8:David Chip BVersion 630" echo "9:David Chip BVersion 632" echo "10:David Chip BVersion 800" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then #echo "git mm Init David Kernel 6.6 Branch" git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c15_1982_kernel_switch -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I2" ]] then #echo "git mm Init David Kernel 5.10 Branch" git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_1982_chip_verify -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I3" ]] then #echo "git mm Init David Kernel 6.6 & UB Branch" git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_esl310_0515 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I4" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_esl510_0510 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I5" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_eslb600_0606 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I6" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_eslb610_0706 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I7" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_protype_20240410 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I8" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v00r100c10_esl630_0826 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I9" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_b632_20241219 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks elif [[ "I$br" == "I10" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_release_torino_v100r001c10b600_soc_abl -g all -p auto git mm sync open_source/libjpeg-turbo repohooks else #echo "git mm Init Main Branch" git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_hisi_trunk_ai -g all -p auto git mm sync open_source/libjpeg-turbo repohooks fi #git mm info -a } function ascend_pull_toolchain { #echo $ost $cpua if [[ "${ost}" == "openeuler" ]] then git mm sync \ hisi/bin/toolchain/"${cpua}"/euleros/ccec_libs_url \ hisi/bin/toolchain/"${cpua}"/euleros/hcc_libs_url \ hisi/bin/toolchain/"${cpua}"/euleros/llvm_libs_url \ -j$((nproc - 1)) else git mm sync \ hisi/bin/toolchain/"${cpua}"/"${osdst}"/ccec_libs_url \ hisi/bin/toolchain/"${cpua}"/"${osdst}"/hcc_libs_url \ hisi/bin/toolchain/"${cpua}"/"${osdst}"/llvm_libs_url \ -j$((nproc - 1)) fi if [[ "${ost}" == "ubuntu" || "${ost}" == "centos" ]] && [[ "${cpua}" == "x86" ]] then git mm sync hisi/bin/toolchain/x86/ubuntu/hcc_r52_libs_url -j$((nproc - 1)) fi } function ascend_pull_comsrc { if [[ -d cmake ]] then cd cmake git checkout . cd "${rootdir}" fi if [[ -d tests/kernel ]] then rm -rf tests/kernel fi #aisdk-product/driver/aisdk_bsp \ #hisi/bios \ #hisi/bootloader/xloader \ #hisi/drivers/network \ #hisi/bootloader/onchiprom_flash \ git mm sync \ hisi/cmake \ hisi/customize \ hisi/build/bin/os/aos_lite_libs_url \ OpenSourceCenter/openEuler/kernel \ hisi/tests/kernel/linux-6.6 \ open_source/kernel-6.6 \ hisi/kernel/vendor \ hisi/libc_sec \ -j$((nproc - 1)) } function pull_codes { read -p "Need Pull Turing Solution Codes Y/y or N/n: " rp rp=${rp^^} if [[ "I${rp}" != "IY" ]] then return fi if [[ ! -d .mm ]] then # echo git mm init "${prds}"_git_mm_init fi git mm sync open_source/libjpeg-turbo repohooks ascend_pull_toolchain if [[ ("${prds}" == "ascend" || "${prds}" == "pegasus") ]] then "${prds}"_pull_comsrc else common_pull_comsrc fi #git mm info -a } function pegasus_git_mm_init { echo "0:Main Branch(Default, Onetrack, br_hisi_trunk_ai)" echo "1:Hi1952V100 Kernel Version 5.10" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then #git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_feature_pegasus_v200r001c10_chipout_test_1126 -g all -p auto git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_pegasus_v200r001c10_protype_20241018 -g all -p auto else #echo "git mm Init Main Branch" git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_hisi_trunk_ai -g all -p auto fi #git mm info -a } function pegasus_pull_comsrc { # peguas build need # $rootdir/build/bin/os 下AOS目录存在,AOS的压缩包解压会报错,未知原因 if [[ -d build/bin/os ]] then sudo rm -rf build/bin/os* fi git mm sync \ hisi/cmake \ hisi/customize \ hisi/build/bin/os/aos_lite_libs_url \ OpenSourceCenter/openEuler/kernel \ hisi/libc_sec \ -j$((nproc - 1)) #Godel_VOS/release/VOS \ #git mm info -a } function solomon_git_mm_init { echo "0:Main Branch(Default, Onetrack, Solomon Chip BVersion 500)" echo "1:Solomon Chip BVersion 500" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_b632_20241219 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks else #echo "git mm Init Main Branch" git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_bbit_torino_v100r001c10_b632_20241219 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks fi #git mm info -a } function DavidV121_git_mm_init { echo "0:Main Branch(Default, Onetrack)" echo "1:DavidV121 Chip BVersion 800" #echo "default: Ascend Solution Main Branch" read -p "Please Select Branch: " br if [[ "I$br" == "I1" ]] then git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_release_torino_v100r001c10b530 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks else #echo "git mm Init Main Branch" git mm init -u ssh://[email protected]:2222/Turing_Solution/platform/manifest.git -b br_release_torino_v100r001c10b530 -g all -p auto git mm sync open_source/libjpeg-turbo repohooks fi #git mm info -a } function common_pull_comsrc { # peguas build need # $rootdir/build/bin/os 下AOS目录存在,AOS的压缩包解压会报错,未知原因 if [[ -d build/bin/os ]] then sudo rm -rf build/bin/os* fi git mm sync \ hisi/cmake \ hisi/customize \ hisi/build/bin/os/aos_lite_libs_url \ OpenSourceCenter/openEuler/kernel \ hisi/tests/kernel/linux-6.6 \ open_source/kernel-6.6 \ hisi/kernel/vendor \ hisi/libc_sec \ -j$((nproc - 1)) #Godel_VOS/release/VOS \ #git mm info -a } function pull_monalisa { cdir="${rootdir}"/tests/chipveri mdir="${cdir}"/monalisa mkdir -p tests "${cdir}" read -p "Need Pull monalisa code now, Y/y or N/n: " rp rp=${rp^^} if [[ "I${rp}" != "IY" ]] then return fi read -p "Input Checkout Branch name: " cbrm # $(()) only for digital #$(("Y${cbrm}" == "Y" ? cbrm="" : cbrm="-b ${cbrm}")) #[[ "Y${cbrm}" == "Y" ]] && gcbrm="" || gcbrm="-b ${cbrm}" if [[ -d ${mdir} ]] then cd "${mdir}" if [[ -d .git ]] then git checkout "${cbrm}" cd "${rootdir}" return fi rm -rf * .g* cd "${rootdir}" fi if [[ "Y${cbrm}" != "Y" ]] then cd "${cdir}" echo git clone https://codehub-dg-y.huawei.com/ICT_bringup/monalisa/monalisa.git -b ${cbrm} cd - else return fi read -p "Need Create Monalisa Branch, Y/y or N/n: " cbrm cbrm=${cbrm^^} if [[ "I${cbrm}" == "IY" ]] then cd "${mdir}" read -p "Input Branch name: " cbrm git branch ${cbrm} git checkout ${cbrm} read -p "Need Push Branch To remote now, Y/y or N/n: " pb pb="${pb^^}" if [[ "I${pb}" == "IY" ]] then git push origin "${cbrm}" fi fi cd "${rootdir}" } function code_init { sudo rm -rf a* b* c* d* C* D* H* i* M* o* p* r* tee tools v* .mm pull_monalisa pull_codes } function get_osinfo { cpua=arch ost=lsb_release -a | grep "Distributor ID" | awk -F":" '{print $2}' | sed 's/^[ \t]*//g' osdst=${ost,,} if [[ "${osdst}" != "ubuntu" ]] && [[ "${osdst}" != "centos" ]] && [[ "${osdst}" != "euleros" ]] && [[ "${osdst}" != "openeuler" ]] then echo "UnSupport OS Type!" exit 1 fi if [[ "${cpua}" == "x86_64" ]] then cpua="x86" else cpua="arm64" fi echo "OS Distr: "$osdst"CPU Arch:"$cpua } function git_install { # install git lfs curl -k https://cmc-szver-artifactory.cmc.tools.huawei.com/artifactory/cmc-software-release/CodeHub/git-lfs/release.v2/git_lfs_autoinstall.sh | sudo sh - && (git lfs uninstall; git lfs install) # 设置git默认编辑器 if [ -e "/usr/bin/vim" ]; then git config --global core.editor vim else git config --global core.editor vi fi echo "git install succ" } function dtc_build { dtcp=which dtc if [[ $dtcp != '' ]] then return fi git clone https://codehub-dg-y.huawei.com/ICT_bringup/tools/dtc.git cd dtc make all sudo make install cd - rm -rf dtc } function python_install { pypath=which python3 # force python link to python3 sudo ln -sf $pypath /usr/bin/python # install pip3 for python3 pippath=which pip3 if [[ $pippath == '' ]] then sudo apt install python3-pip fi sudo pip3 install Gitdb -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install GitPython -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install PyYAML -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install ruamel.yaml -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install ruamel.yaml.clib -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install rich -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install pytest -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install toml -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com # sudo pip3 install textual-dev -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install httpx -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo pip3 install openpyxl -i http://cmc-cd-mirror.rnd.huawei.com/pypi/simple/ --trusted-host cmc-cd-mirror.rnd.huawei.com sudo chmod 755 -R /usr/local/lib/python3* sudo chmod 755 -R /usr/local/lib64/python3* echo "Python install succ" } function ascend_modsig_init { #curl -s -o pwd/signature-jenkins-slave-5.1.19-RELEASE.zip https://cmc-szver-artifactory.cmc.tools.huawei.com/artifactory/cmc-builtools-prod/SignatureClient/0599A7L5/toolVersion/0599AC25/20221119162112511/Software/signature-jenkins-slave-5.1.19-RELEASE.zip wget --no-check-certificate -P pwd/ https://cmc-szver-artifactory.cmc.tools.huawei.com/artifactory/cmc-builtools-prod/SignatureClient/0599A7L5/toolVersion/0599AC25/20221119162112511/Software/signature-jenkins-slave-5.1.19-RELEASE.zip #curl -s -o pwd/jre-8u392-linux-x64.tar.gz https://cmc-hgh-artifactory.cmc.tools.huawei.com/artifactory/cmc-software-release/Huawei%20JDK/Huawei%20JDK%20V100R001/Huawei%20JDK%20V100R001C00SPC390B003/jre-8u392-linux-x64.tar.gz wget --no-check-certificate -P pwd/ https://cmc-hgh-artifactory.cmc.tools.huawei.com/artifactory/cmc-software-release/Huawei%20JDK/Huawei%20JDK%20V100R001/Huawei%20JDK%20V100R001C00SPC390B003/jre-8u392-linux-x64.tar.gz sudo unzip signature-jenkins-slave-5.1.19-RELEASE.zip -d /usr/local/ rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/root.jks sudo rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/client.jks sudo rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ssl.properties sudo rm -f /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/trustcerts/root.crt sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/root.jks sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/newcert/client.jks sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/newcert/ssl.properties sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/sslcerts/trustcerts/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/newcert/root.crt sudo wget -P /usr/local/signature-jenkins-slave-5.1.19-RELEASE/certs/ http://nexus.turing-ci.hisilicon.com/repository/files/turing-ci/G2RootCATest.cer sudo cp /usr/local/signature-jenkins-slave-5.1.19-RELEASE/signature.jar /usr/local/signature-jenkins-slave-5.1.19-RELEASE/lib sudo cp jre-8u392-linux-x64.tar.gz /usr/local/signature-jenkins-slave-5.1.19-RELEASE/ sudo chmod -R 755 /usr/local/signature-jenkins-slave-5.1.19-RELEASE/ #unzip signature-jenkins-slave-5.1.19-RELEASE.zip #mv jre-8u392-linux-x64.tar.gz signature-jenkins-slave-5.1.19-RELEASE/ } function ascend_env_init { # 修改PATH变量,使得~/bin里的可执行文件能被找到 if [[ cat ~/.bashrc | grep "PATH=~/bin" == '' ]] then echo "export PATH=~/bin:$PATH" >> ~/.bashrc fi # 临时去掉代理, 保证获取的git mm工具是正确的 if [[ cat ~/.bashrc | grep "export no_proxy" == '' ]] then echo "export no_proxy+=,10.141.107.107,.hisilicon.com,.huawei.com" >> ~/.bashrc fi source ~/.bashrc dtc_build #${prds}_modsig_init } function euleros_init { sudo yum install -y \ autoconf automake autogen bc bison bzip2-devel \ cmake elfutils-libelf-devel flex \ gcc gcc-c++ gettext git libffi-devel libtool make \ ncurses openssl-devel openssl pkgconfig python3 python3-devel \ readline readline-devel rpm rpm-build \ samba sqlite-devel tcl tcsh texinfo tk unzip \ xz xz-devel zip zlib-devel sudo yum update } function ubuntu_init { sudo apt update sudo apt install lcov ntp expect unzip curl ntpdate \ lrzsz autoconf libtool nfs-common default-jre \ openssl git libssl-dev bison flex bc libncurses5 \ rpm2cpio build-essential ncurses-dev \ xz-utils libelf-dev cppcheck git gcc python3.8 \ fakeroot pkg-config libglib2.0-dev dos2unix \ libyaml-dev lsb-core automake texinfo gettext unrar zip \ checkinstall libgtk-3-dev \ libexpat1-dev zlib1g-dev libcurl4-gnutls-dev \ libncurses5-dev libreadline-dev help2man \ libncurses-dev apt-file rpm cmake libbz2-dev \ uuid-dev libtinfo-dev libtinfo5 cppcheck-gui \ ubuntu-restricted-extras #sudo apt install linux-headers-5.4.0-42-generic sudo apt upgrade } function tools_init { sudo ln -sf /usr/bin/bash /usr/bin/sh get_osinfo ${osdst}_init git_install python_install ascend_env_init } #echo $# if [[ $# < 2 ]] then echo "Usage: ./monalisa_init.sh operation product" echo " eg: ./monalisa_init.sh init ascend" echo " or: ./monalisa_init.sh update ascend /data/workdir/hi1982" exit 1 fi prds=$2 user_name="" user_email="" rootdir=pwd cpua="" osdst="" tools_init if [[ $1 == "init" ]] then code_init if [[ ("${prds}" == "ascend" || "${prds}" == "solomon" || "${prds}" == "DavidV121") && "${osdst}" == "euleros" ]] then echo "====================install numa=======================" sudo yum install numactl-devel sudo yum install numactl-libs cp /usr/lib64/libnuma.so* \ build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-genl-3.so.200.26.0 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-3.so build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-genl-3.so build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-genl-3.so.200 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-3.so.200 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ cp /usr/lib64/libnl-3.so.200.26.0 build/bin/toolchain/arm64/euleros/hcc_libs/hcc_glibc_trusted_arm64_euleros_2_12_adk/do_arm64le_native/sysroot/usr/lib64/ fi if [[ "${prds}" == "solomon" ]] && [[ "I$br" == "I1" ]] && [[ "${osdst}" == "euleros" ]] then cd $rootdir/tests/kernel/linux-6.6/ git reset --hard bbd3e15c40570df1b4a66f9ac402a07710b7c7ed elif [[ "${prds}" == "DavidV121" ]] then cd $rootdir/open_source/kernel-6.6/ git reset --hard 21636d939ed4956cec36b4eba2fb18b8ad68efab cd $rootdir/drivers/kernel/ git reset --hard 0305b56317cd785db15e2f10cced6916bdba1abc fi exit 0 else pull_codes exit 0 fi

大家在看

recommend-type

微信聊天记录导出- MemoTrace 留痕 2.0.6(WeChatMsg)

解锁Windows本地数据库 还原微信聊天界面: 文本 图片 拍一拍等系统消息 导出数据: 批量导出数据 导出联系人 sqlite数据库 HTML(文本、图片、视频、表情包、语音、文件、系统消息) CSV文档 TXT文档 Word文档 使用步骤: 登录要导出数据的微信(不支持微信多开,不支持部分老版本微信); 点击获取信息之后,正常情况下所有信息均会自动填充,这时候就直接点击开始启动就行了; 如果微信路径获取失败,就手动设置为微信中文件管理路径下的wxid_xxx文件夹,该wxid必须和前面获取的wxid一致,否则的话会显示密钥错误; 点击开始启动; 成功后新的数据库会存储在 WeChatMsg 软件目录下的 app/DataBase/Msg文件夹中; 最后重新启动WeChatMsg即可。
recommend-type

蒙特卡罗剂量模拟和可视化工具包:一组旨在帮助临床医生和研究人员使用 GEANT4 或 TOPAS 的 Matlab 函数-matlab开发

这里有 3 组代码,旨在帮助临床医生和研究人员将 GEANT4 或 TOPAS (MC) 与 3D Slicer 结合使用进行剂量可视化和比较 第一段代码“STLfromDicomRN.m”采用 Varian Eclipse 生成的双散射质子计划的 Dicom 计划文件,并以“.STL”格式生成计划中的Kong径和补偿器模型。 此文件使用 zip 文件中包含的“stlwrite”和“surf2solid”函数。 这些文件可以导入到 MC 模拟几何中。 第二个是一组用于处理Dicom剂量文件和分析剂量的代码。 “NormalizeDicomDose.m”代码将 MC 剂量标准化为 Eclipse 剂量等中心处的剂量,并包含有关如何标准化为其他点或体积的说明。 “ProfilePlot.m”代码只是生成比较两点之间两个剂量文件的剂量的剂量曲线。 包含的是一个 matlab gui,它在您
recommend-type

按时间抽取的蝶形运算流图-FFT原理以及实现

按时间抽取的蝶形运算流图:
recommend-type

基于STM8的点阵屏汉字显示-电路方案

本方案主控采用STM8S207C8T6,1.7寸128*64LCD液晶显示屏,LCD驱动芯片采用UC1701(可兼容ST7565),字库显示采用高通GT20L16S1Y字库芯片, 以实现LCD界面上的显示。详细资料及代码可查看附件。 以下分别是STM8S207C8T6,UC1701和GT20L16S1Y在原理图中的模块电路。 原理图是依据datasheet中的阐述所绘制,其中主控电路是使用了stm8s207c8t6芯片绘制的最小系统。显示屏部分是根据设置BM0和BM1来选择总线模式绘制的电路。这里我使用了SPI总线模式。而字库芯片本身就是SPI总线模式通信,直接根据规格书的电路例子使用即可。完成了电路部分,知道了总线模式,再结合数据手册就可以对改设备编写程序代码了。首先是LCD液晶屏的驱动,要液晶屏显示你想要的数据,主要是LCD初始化成功。 下面是LCD初始化程序,根据指令列表编写的程序代码: 附件内容截图:
recommend-type

FIBOCOM FM650-CN系列 硬件指南_V1.0.1.pdf

FIBOCOM FM650-CN系列 硬件指南_V1.0.1.pdf

最新推荐

recommend-type

Centos7环境下Nginx版本升级方式及步骤

在CentOS7环境中,对Nginx进行版本升级是一个重要的任务,这可能是因为新版本提供了更多的功能、性能优化或安全修复。本篇文章将详细介绍两种在CentOS7上升级Nginx的方法:YUM upgrade和源码平滑升级,并提供相关的...
recommend-type

win10+centos7+centos7桌面双系统安装.docx

在本文中,我们将深入探讨如何在Windows 10操作系统上安装CentOS 7,并设置一个双系统的环境,同时安装CentOS 7的图形用户界面。这个过程涉及到分区管理、GRUB配置、系统更新以及内核管理等多个关键步骤。 首先,...
recommend-type

MySql5.x升级MySql8.x的方法步骤

MySQL是世界上最受欢迎的关系型数据库管理系统之一,从MySQL 5.x版本升级到MySQL 8.x版本可以享受到更多新特性和性能优化。以下是一个详细的升级过程,包括关键步骤和注意事项。 **一、准备工作** 在升级之前,...
recommend-type

学会这十个技术点,年薪轻松翻倍.doc

学会这十个技术点,年薪轻松翻倍.doc
recommend-type

PKID查壳工具最新版发布,轻松识别安卓安装包加壳

根据提供的文件信息,我们可以详细解读以下知识点: ### PKiD(查壳)工具介绍 #### 标题分析 - **PKiD(查壳)**: 这是一个专门用于分析安卓安装包(APK文件)是否被加壳的应用程序。"查壳"是一种用于检测软件是否被保护层(即“壳”)包裹的技术术语。加壳是一种常见的软件保护手段,用于隐藏真实的代码逻辑,防止恶意逆向分析。 - **RAR格式文件**: 文件使用了RAR格式进行压缩,这是WinRAR软件用于文件压缩和解压缩的专有格式。 #### 描述分析 - **ApkScan-PKID查壳工具.zip**: 这指的是一款名为ApkScan的工具,它包含了PKID查壳功能。该工具被打包成ZIP格式,便于用户下载和使用。 - **安卓安装包**: 这是指Android平台的应用程序安装包,通常以APK作为文件扩展名。 - **加壳检测**: PKID查壳工具用于检测APK文件是否被加壳,加壳是一种常见的软件保护技术,用于加密和保护软件免遭逆向工程。 - **脱壳测试**: 如果检测到加壳,脱壳测试将用于尝试去除或绕过保护层,以便进行安全分析、调试或修改程序。 #### 标签分析 - **查壳**: 再次强调了工具的主要功能,即检测APK文件中的加壳情况。 - **最新版**: 表示这个文件是PKID查壳工具的最新版本。 - **PKID**: 这是工具的核心名称,代表着该软件的主要功能和用途。 #### 文件列表分析 - **PKiD(查壳).exe**: 这是一个可执行文件,说明PKID查壳工具是一个独立的应用程序,用户可以通过双击此文件直接运行程序,而无需安装。 ### 技术背景 #### 查壳工具的工作原理 查壳工具通常通过分析APK文件的头部信息、资源文件和代码段来检测加壳。它可能会检查PE文件格式的特定区域(APK基于DEX,但PE检查的概念相似),这些区域在加壳过程中可能会被特定的代码模式、字符串或签名标记。例如,某些壳会在文件头部加入特定的字符串,或者修改方法计数等信息。 #### 加壳技术 加壳技术通常用于防止软件被轻易反编译或逆向工程。它可以阻止潜在的窃取知识产权、绕过付费或防止代码分析等。加壳过程包括加密和压缩原始代码,然后在运行时解压和解密代码以供执行。 #### 脱壳技术 脱壳技术是指绕过或移除软件保护壳的过程。这通常需要对壳的工作原理有深入了解,并且需要一定的逆向工程技能。脱壳过程可能包括识别壳的签名、分析保护机制、修改代码和重定位等步骤。 #### 安全测试与逆向工程 查壳工具对于安全测试和逆向工程人员来说是非常重要的工具。它们可以帮助识别软件是否被加壳,从而决定是否需要进行脱壳操作以便深入分析软件的安全漏洞或版权问题。 #### 使用场景 - **安全测试**: 安全工程师在对移动应用程序进行安全评估时,需要确认是否有必要进行脱壳处理。 - **逆向工程**: 开发人员可能需要逆向工程某个应用,以更好地理解其工作原理或为了兼容性问题进行修改。 - **软件保护**: 对于软件开发者而言,了解常见的加壳和脱壳技术有助于更好地保护自己的应用免遭未授权的篡改和分析。 ### 结论 了解和掌握PKID查壳工具的使用对于任何需要对APK文件进行安全性分析的专业人士来说都是基础且关键的技能。该工具提供了一种快速判断软件是否加壳的方法,而且在发现壳的情况下,还可以推测出壳的来源公司,这对于后续的分析和处理提供了便利。然而,值得注意的是,进行脱壳操作往往需要对原始程序代码进行逆向工程,这在很多情况下可能涉及法律和道德问题,因此在使用此类工具时,必须确保其合法性和符合道德规范。
recommend-type

【PDF.js问题诊断手册】:快速定位与解决常见问题

# 摘要 PDF.js是一个广泛应用于Web环境中的PDF文件渲染库,其基本原理和应用概况将在本文第一章进行概述。第二章深入探讨PDF.js的问题诊断基础,包括架构分析、问题分类和日志分析技巧。随后,本文将具体讨论PDF.js在显示问题、加载与性能问题以及兼容性与安全问题的诊断与
recommend-type

grep -Ei

<think>首先,用户的问题是关于使用grep命令进行忽略大小写的扩展正则表达式搜索。用户指定了:"grep -Ei ignore case and use extended regular expressions"。所以,我需要解释如何使用grep的-E和-i选项。 从系统指令中: - 所有行内数学表达式必须用$...$格式。 - 独立公式用$$...$$。 - 使用中文回答。 - 生成相关问题。 - 在回答中引用的段落末尾添加引用标识,如[^1]。 - 回答结构清晰,逐步解决问题。 参考引用: - 引用[1]提到使用-E选项进行扩展正则表达式,而不是基本正则表达式。这更清晰,因为反斜
recommend-type

一键关闭系统更新的工具介绍

从给定的文件信息中我们可以分析出几个相关的知识点,以下是详细说明: 【标题】“系统禁止更新工具.7z”暗示着这个压缩文件内包含的可能是一款软件工具,其主要功能是阻止或禁止操作系统的更新。这种工具可能针对的是Windows、Linux或者其他操作系统的自动更新功能。一般来说,用户可能出于稳定性考虑,希望控制更新时间,或者是因为特定的软件环境依赖于旧版本的系统兼容性,不希望系统自动更新导致兼容性问题。 【描述】“一健关闭系统更新”说明了该工具的使用方式非常简单直接。用户只需通过简单的操作,比如点击一个按钮或者执行一个命令,就能实现关闭系统自动更新的目的。这种一键式操作符合用户追求的易用性原则,使得不太精通系统操作的用户也能轻松控制更新设置。 【标签】“系统工具”表明这是一个与操作系统紧密相关的辅助工具。系统工具通常包括系统清理、性能优化、磁盘管理等多种功能,而本工具专注于管理系统更新,使其成为系统维护中的一环。 【压缩包子文件的文件名称列表】“系统禁止更新工具”是压缩包内的文件名。由于文件格式为“.7z”,这说明该工具采用了7-Zip压缩格式。7-Zip是一款开源且免费的压缩软件,支持非常高的压缩比,并且能够处理各种压缩文件格式,如ZIP、RAR等。它支持创建密码保护的压缩文件和分卷压缩,这在需要转移大量数据时特别有用。然而在这个上下文中,“系统禁止更新工具”文件名暗示了该压缩包内只包含了一个程序,即专门用于关闭系统更新的工具。 根据标题和描述,我们可以推测该工具可能的实现机制,例如: 1. 修改系统服务的配置:在Windows系统中,可以通过修改Windows Update服务的属性来禁用该服务,从而阻止系统自动下载和安装更新。 2. 修改注册表设置:通过编辑Windows注册表中的某些特定键值,可以关闭系统更新功能。这通常涉及到对HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate和HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU等路径下的设置进行修改。 3. 使用第三方软件:某些第三方工具提供了一键禁用系统更新的功能,通过修改操作系统的相关文件和配置来实现更新的禁用。这包括阻止Windows Update的运行、拦截更新下载等。 该工具的使用可能带来一些后果,比如系统安全风险的增加、系统漏洞得不到及时修复以及可能违反某些软件许可协议。用户在使用这类工具时应该清楚这些潜在的影响,并自行承担相应的风险。 总结来说,该“系统禁止更新工具”可以视为一个针对特定用户需求,尤其是企业用户或个人用户中对系统稳定性有较高要求的人群,提供的一个便捷的解决方案。它通过直接修改系统设置来禁止操作系统自动更新,但用户在使用此工具时需要谨慎,因为这可能会带来系统安全和稳定性的风险。
recommend-type

【PC3000高级应用】:复杂故障快速诊断与解决

# 摘要 本文详细介绍了PC3000在数据恢复领域的应用及其重要性,阐述了其基本操作、界面理解以及在复杂故障诊断中的应用方法。深入剖析了PC3
recommend-type

我的数据是names(data) [1] "分组" "排序" "PACU" "V1" "V2" "V3" ;后四个数据分别代表四个时间点的测量值,请你用ART模型进行规范检验,我需要得到分组(即不同处理方法)的差异

<think>我们正在处理一个重复测量设计的数据分析问题,用户希望使用ART(Align Rank Transform)方法分析包含分组因素和多个时间点的数据。数据格式包括分组变量(group)、受试者编号(subject)以及四个时间点(V1-V3)的测量值。 ART分析步骤: 1. 数据准备:将宽格式数据转换为长格式(每个时间点一行) 2. 使用ARTool包进行对齐秩变换 3. 构建混合效应模型(包含分组、时间及其交互) 4. 对变换后的数据进行方差分析 5. 进行事后检验(如存在显著效应) 引用说明: - 用户提供的引用[1][2][3][4]与当前问题无关,因此忽略这些引用 -