签到成功

知道了

CNDBA社区CNDBA社区

suse 12 创建本地zypper源

2022-03-31 22:17 2096 0 原创 Linux
作者: hbhe0316
linux-8c00:~ # cat /etc/SuSE-release
SUSE Linux Enterprise Server 12 (x86_64)
VERSION = 12
PATCHLEVEL = 5
# This file is deprecated and will be removed in a future service pack or release.
# Please check /etc/os-release for details about this release.

linux-8c00:~ # mkdir -p /mnt/sles

挂载iso镜像到/mnt/sles
linux-8c00:~ # mount -t iso9660 /dev/cdrom /mnt/sles/
mount: /mnt/sles: WARNING: device write-protected, mounted read-only.

创建zypper源,名称为sles
linux-8c00:~ # zypper ar -f /mnt/sles sles
Adding repository 'sles' .................................................[done]
Repository 'sles' successfully added

URI         : dir:///mnt/sles      
Enabled     : Yes                  
GPG Check   : Yes                  
Autorefresh : Yes                  
Priority    : 99 (default priority)

Repository priorities are without effect. All enabled repositories share the same priority.
linux-8c00:~ # zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias             | Name              | Enabled | GPG Check | Refresh
--+-------------------+-------------------+---------+-----------+--------
1 | SLES12-SP5-12.5-0 | SLES12-SP5-12.5-0 | Yes     | (r ) Yes  | No     
2 | sles              | sles              | Yes     | ( p) Yes  | Yes    

安装gcc软件
linux-8c00:~ # zypper install gcc
Retrieving repository 'sles' metadata ---------------------------------------[/]
Warning: The gpg key signing file 'content' has expired.
  Repository:       sles                                        
  Key Name:         SuSE Package Signing Key <build@suse.de>    
  Key Fingerprint:  FEAB5025 39D846DB 2C0961CA 70AF9E81 39DB7C82
  Key Created:      Wed 07 Dec 2016 06:57:35 PM CST             
  Key Expires:      Sun 06 Dec 2020 06:57:35 PM CST (EXPIRED)   
  Rpm Name:         gpg-pubkey-39db7c82-5847eb1f                
Retrieving repository 'sles' metadata ....................................[done]
Building repository 'sles' cache .........................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 9 NEW packages are going to be installed:
  gcc gcc48 glibc-devel libasan0 libatomic1 libgomp1 libitm1 libtsan0
  linux-glibc-devel

9 new packages to install.
Overall download size: 11.0 MiB. Already cached: 0 B. After the operation,
additional 43.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package linux-glibc-devel-4.12-3.3.1.noarch
                                           (1/9),   1.2 MiB (  5.5 MiB unpacked)
Retrieving package libasan0-4.8.5-31.20.1.x86_64
                                           (2/9),  79.8 KiB (166.8 KiB unpacked)
Retrieving package libatomic1-8.2.1+r264010-1.3.3.x86_64
                                           (3/9),  16.1 KiB ( 26.1 KiB unpacked)
Retrieving package libgomp1-8.2.1+r264010-1.3.3.x86_64
                                           (4/9), 102.2 KiB (255.7 KiB unpacked)
Retrieving package libitm1-8.2.1+r264010-1.3.3.x86_64
                                           (5/9),  34.5 KiB (110.4 KiB unpacked)
Retrieving package libtsan0-8.2.1+r264010-1.3.3.x86_64
                                           (6/9), 280.9 KiB (929.1 KiB unpacked)
Retrieving package glibc-devel-2.22-100.15.4.x86_64
                                           (7/9), 665.3 KiB (  3.0 MiB unpacked)
Retrieving package gcc48-4.8.5-31.20.1.x86_64
                                           (8/9),   8.6 MiB ( 33.1 MiB unpacked)
Retrieving package gcc-4.8-6.189.x86_64    (9/9),   5.4 KiB (    0   B unpacked)
Checking for file conflicts: .............................................[done]
(1/9) Installing: linux-glibc-devel-4.12-3.3.1.noarch ....................[done]
(2/9) Installing: libasan0-4.8.5-31.20.1.x86_64 ......................................................................................................................................................................................[done]
(3/9) Installing: libatomic1-8.2.1+r264010-1.3.3.x86_64 ..............................................................................................................................................................................[done]
(4/9) Installing: libgomp1-8.2.1+r264010-1.3.3.x86_64 ................................................................................................................................................................................[done]
(5/9) Installing: libitm1-8.2.1+r264010-1.3.3.x86_64 .................................................................................................................................................................................[done]
(6/9) Installing: libtsan0-8.2.1+r264010-1.3.3.x86_64 ................................................................................................................................................................................[done]
(7/9) Installing: glibc-devel-2.22-100.15.4.x86_64 ...................................................................................................................................................................................[done]
(8/9) Installing: gcc48-4.8.5-31.20.1.x86_64 .........................................................................................................................................................................................[done]
(9/9) Installing: gcc-4.8-6.189.x86_64 ...............................................................................................................................................................................................[done]

清除缓存
linux-8c00:~ # zypper clean

刷新安装源
linux-8c00:~ # zypper ref
http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903 http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903
http://www.cndba.cn/hbhe0316/article/107903

版权声明:本文为博主原创文章,未经博主允许不得转载。

LINUX

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:1039440次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ