翼度科技»论坛 云主机 LINUX 查看内容

centos8-x86_64安装kylinv10-arrch64

4

主题

4

帖子

12

积分

新手上路

Rank: 1

积分
12
1. vmware esxi安装centos8,开启内核虚拟化
2. 安装qemu-system-arrch64
操作:
  1. wget https://download.qemu.org/qemu-2.11.0.tar.xz
  2. tar xvJf qemu-2.11.0.tar.xz
  3. cd qemu-2.11.0
  4. ./configure –-target-list=aarch64-softmmu
  5. make
  6. make install
复制代码
报错1:Python not found. Use --python=/path/to/python
  1. #  ./configure --target-list=aarch64-softmmu
  2. ERROR: Python not found. Use --python=/path/to/python
  3. #解决1,指定python路径,提示当前python版本过高:
  4. # ./configure --target-list=aarch64-softmmu --python=/usr/bin/python3.6
  5. ERROR: Cannot use '/usr/bin/python3.6', Python 2.6 or later is required.
  6.        Note that Python 3 or later is not yet supported.
  7.        Use --python=/path/to/python to specify a supported Python.
  8. #解决2,下载python2,再次尝试遇到新的报错
  9. # ./configure --target-list=aarch64-softmmu --python=/usr/bin/python2
  10. ERROR: "cc" either does not exist or does not work
复制代码
报错2:ERROR: "cc" either does not exist or does not work
下载gcc解决该报错,然后提示依然是缺包
  1. # ./configure --target-list=aarch64-softmmu --python=/usr/bin/python2
  2. ERROR: zlib check failed
  3.        Make sure to have the zlib libs and headers installed.
复制代码
报错3:ERROR: zlib check failed  Make sure to have the zlib libs and headers installed.
下载zlib zlib-devel,然后再次提示缺包
  1. # ./configure --target-list=aarch64-softmmu --python=/usr/bin/python2
  2. ERROR: glib-2.22 gthread-2.0 is required to compile QEMU
复制代码
下载glib2 glib2-devel,提示还是缺包
下载pixman pixman-devel
./config成功
make告警:缺少命令:flex bison
下载flex,bison
然后还是失败:
  1. util/memfd.c:40:12: error: static declaration of ‘memfd_create’ follows non-static declaration
  2. static int memfd_create(const char *name, unsigned int flags)
  3.             ^~~~~~~~~~~~
  4. In file included from /usr/include/bits/mman-linux.h:117,
  5.                  from /usr/include/bits/mman.h:49,
  6.                  from /usr/include/sys/mman.h:41,
  7.                  from /root/qemu-2.11.0/include/sysemu/os-posix.h:29,
  8.                  from /root/qemu-2.11.0/include/qemu/osdep.h:104,
  9.                  from util/memfd.c:28:
  10. /usr/include/bits/mman-shared.h:46:5: note: previous declaration of ‘memfd_create’ was here
  11. int memfd_create (const char *__name, unsigned int __flags) __THROW;
  12.      ^~~~~~~~~~~~
  13. make: *** [/root/qemu-2.11.0/rules.mak:66: util/memfd.o] Error 1
复制代码
 
看百度上各种解决办法,懒得去一个一个验证,直接换最新的包
  1. wget https://download.qemu.org/qemu-7.2.0.tar.xz<br>
复制代码
查看README文件,根据提示操作
  1. mkdir build
  2.   cd build
  3.   ../configure
  4.   make
复制代码
提示缺包ninjia
  1. yum --enablerepo=powertools install ninja-build
复制代码
这次提示python版本过低
  1. Found ninja-1.8.2 at /usr/bin/ninja
  2. Running postconf script '/usr/bin/python3 /root/qemu-7.2.0/scripts/symlink-install-tree.py'
  3. NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer
复制代码
安装一个python3.9 然后把/usr/bin/python3指向python3.9
然后再次执行
  1. mkdir build
  2.   cd build
  3.   ../configure --target-list=aarch64-softmmu
  4.   make
复制代码
无报错
  1. make install
复制代码
缺包就装包:perl
然后make install成功
  1. # which qemu-system-aarch64
  2. /usr/local/bin/qemu-system-aarch64
复制代码
为了支持UEFI启动,下载UEFI固件
  1. wget https://www.kraxel.org/repos/firmware.repo
  2. yum install edk2.git-aarch64
复制代码
 编辑/etc/libvirt/qemu.conf最后一行添加
  1. nvram = [
  2.    "/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
  3. ]
复制代码
 
 
 
 
 
参考链接:https://wiki.ubuntu.com/UEFI/virt-install
https://www.txisfine.cn/archives/a0d5fa12
https://www.cnblogs.com/linuxxl/p/11658387.html
https://zhuanlan.zhihu.com/p/353547345

来源:https://www.cnblogs.com/santia-god/p/17192366.html
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作!

举报 回复 使用道具