我正在CentO 8上运行以下命令
$ cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)
我首先使用一个干净且更新的yum数据库:
$ yum clean all
46 files removed
$ yum update
CentOS-8 - AppStream 18 MB/s | 5.8 MB 00:00
CentOS-8 - Base 15 MB/s | 2.2 MB 00:00
CentOS-8 - Extras 121 kB/s | 7.9 kB 00:00
CentOS-8 - PowerTools 9.0 MB/s | 1.9 MB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 271 kB/s | 117 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 26 MB/s | 8.0 MB 00:00
yum Dependencies resolved.
Nothing to do.
Complete!
如果我用yum搜索cmake3
程序包,或尝试显示详细信息,则它不起作用:
$ yum search cmake3
Last metadata expiration check: 0:01:03 ago on Fri 11 Sep 2020 07:47:47 AM UTC.
No matches found.
$ yum info cmake3
Last metadata expiration check: 0:02:24 ago on Fri 11 Sep 2020 07:47:47 AM UTC.
Error: No matching Packages to list
如果我尝试安装cmake3
软件包,它将安装cmake
软件包
$ yum install cmake3
Last metadata expiration check: 0:22:10 ago on Fri 11 Sep 2020 07:47:47 AM UTC.
Dependencies resolved.
==============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================================================================================================================
Installing:
cmake x86_64 3.11.4-7.el8 AppStream 8.1 M
Installing dependencies:
cmake-data noarch 3.11.4-7.el8 AppStream 1.3 M
cmake-filesystem x86_64 3.11.4-7.el8 AppStream 40 k
cmake-rpm-macros noarch 3.11.4-7.el8 AppStream 39 k
libuv x86_64 1:1.23.1-1.el8 AppStream 134 k
Transaction Summary
==============================================================================================================================================================================================================================================
Install 5 Packages
Total download size: 9.7 M
Installed size: 29 M
Is this ok [y/N]:
这是怎么回事?为什么search
和info
失败,但是install
成功(并且安装了稍有不同的pacakge)?
答案 0 :(得分:2)
由于BOOTOUTPUT = boot.bin
OSOUTPUT = os.bin
SRCS = $(shell find . -name '*.c')
CINC = $(shell find . -name '*.h')
COBJS = $(patsubst %.c, %.o, $(SRCS))
OBJDIR = build
#Final step in the build process
$(OSOUTPUT): kernel.bin $(BOOTOUTPUT)
cat $(BOOTOUTPUT) kernel.bin > $(OSOUTPUT)
#Assemble the boot sector code
$(BOOTOUTPUT): boot/bootsector.asm
nasm -f bin boot/bootsector.asm -o $(BOOTOUTPUT)
#Compile all the kernel C files
%.o:%.c $(CINC)
gcc -m32 -ffreestanding -fno-pie -fno-stack-protector -nostdlib -c $< -o $@
#Assemble the IRQ code
irq.o: kernel/irq.asm
nasm kernel/irq.asm -f elf32 -o irq.o
#Assemble the kernel entry code
kernelEntry.o: boot/kernelEntry.asm
nasm boot/kernelEntry.asm -f elf32 -o kernelEntry.o
#Link all the .o files with the kernel entry
kernel.bin: kernelEntry.o irq.o $(COBJS)
ld -melf_i386 -o kernel.bin -Ttext 0x1000 $^ --oformat binary
run:
qemu-system-x86_64 -fda $(OSOUTPUT)
clean:
rm -f *.bin *.o $(COBJS)
软件包提供了
kernelmain.o: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
0: f3 0f 1e fb endbr32
4: 8d 4c 24 04 lea 0x4(%esp),%ecx
8: 83 e4 f0 and $0xfffffff0,%esp
b: ff 71 fc pushl -0x4(%ecx)
e: 55 push %ebp
f: 89 e5 mov %esp,%ebp
11: 51 push %ecx
12: 83 ec 54 sub $0x54,%esp
15: e8 fc ff ff ff call 16 <main+0x16>
1a: 83 ec 08 sub $0x8,%esp
1d: 6a 0e push $0xe
1f: 6a 01 push $0x1
21: e8 fc ff ff ff call 22 <main+0x22>
26: 83 c4 10 add $0x10,%esp
29: e8 fc ff ff ff call 2a <main+0x2a>
2e: e8 fc ff ff ff call 2f <main+0x2f>
33: dd 05 00 00 00 00 fldl 0x0
39: dd 5d f0 fstpl -0x10(%ebp)
3c: dd 05 08 00 00 00 fldl 0x8
42: dd 5d e8 fstpl -0x18(%ebp)
45: dd 45 f0 fldl -0x10(%ebp)
48: dc 75 e8 fdivl -0x18(%ebp)
4b: dd 5d e0 fstpl -0x20(%ebp)
4e: dd 05 08 00 00 00 fldl 0x8
54: dd 5d d8 fstpl -0x28(%ebp)
57: dd 45 e0 fldl -0x20(%ebp)
5a: dd 05 08 00 00 00 fldl 0x8
60: df e9 fucomip %st(1),%st
62: dd d8 fstp %st(0)
64: 7a 56 jp bc <main+0xbc>
66: dd 45 e0 fldl -0x20(%ebp)
69: dd 05 08 00 00 00 fldl 0x8
6f: df e9 fucomip %st(1),%st
71: dd d8 fstp %st(0)
73: 75 47 jne bc <main+0xbc>
75: c7 45 ac 48 61 72 64 movl $0x64726148,-0x54(%ebp)
7c: c7 45 b0 63 6f 64 65 movl $0x65646f63,-0x50(%ebp)
83: c7 45 b4 64 20 76 61 movl $0x61762064,-0x4c(%ebp)
8a: c7 45 b8 6c 75 65 73 movl $0x7365756c,-0x48(%ebp)
91: c7 45 bc 20 77 65 72 movl $0x72657720,-0x44(%ebp)
98: c7 45 c0 65 20 63 6f movl $0x6f632065,-0x40(%ebp)
9f: c7 45 c4 72 72 65 63 movl $0x63657272,-0x3c(%ebp)
a6: c7 45 c8 74 0a 00 00 movl $0xa74,-0x38(%ebp)
ad: 83 ec 0c sub $0xc,%esp
b0: 8d 45 ac lea -0x54(%ebp),%eax
b3: 50 push %eax
b4: e8 fc ff ff ff call b5 <main+0xb5>
b9: 83 c4 10 add $0x10,%esp
bc: c7 45 cc 45 6e 64 20 movl $0x20646e45,-0x34(%ebp)
c3: c7 45 d0 6f 75 74 70 movl $0x7074756f,-0x30(%ebp)
ca: c7 45 d4 75 74 00 00 movl $0x7475,-0x2c(%ebp)
d1: 83 ec 0c sub $0xc,%esp
d4: 8d 45 cc lea -0x34(%ebp),%eax
d7: 50 push %eax
d8: e8 fc ff ff ff call d9 <main+0xd9>
dd: 83 c4 10 add $0x10,%esp
e0: eb fe jmp e0 <main+0xe0>
,因此该软件包将由class Notifier extends ChangeNotifier {}
Notifier notifier;
for (int i = 0; i < 2; i++) {
// Should I remove listeners before creation new instance of `Notifier`?
// Or new instantiaion assumes that all listeners attached to object will be removed?
notifier?.removeListener(_listener);
notifier = Notifier();
notifier.addListener(_listener);
}
void _listener() {}
安装,因为不存在名称确切的cmake3
的软件包:
cmake
yum install
联机帮助页中有一个类似的示例(在RHEL8中将其重定向到cmake3
):
# yum provides cmake3 cmake-3.11.4-7.el8.x86_64 : Cross-platform make system Repo : AppStream Matched from: Provide : cmake3 = 3.11.4-7.el8
DNF会自动识别vim不是软件包名称,但会查找并安装一个为vim提供所有必需依赖项的软件包。注意:程序包名称匹配优先于程序包提供匹配。