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
版权声明:本文为博主原创文章,未经博主允许不得转载。
LINUX