照著https://wiki.debian.org/QEMU 的教學
輸入這兩行指令沒問題
$ qemu-img create debian.img 2G
$ qemu-img create -f qcow2 debian.qcow 2G
這行指令發生錯誤
$ qemu-system-x86_64 -hda debian.img -cdrom debian-testing-amd64-netinst.iso -boot d -m 512
Failed to open module: /usr/lib/x86_64-linux-gnu/qemu/ui-gtk.so: undefined symbol: message_with_timestamp
....
修改/etc/apt/sources.list
原本是:
deb http://deb.debian.org/debian stable main contrib
deb-src http://deb.debian.org/debian stable main contrib
改成:
deb http://deb.debian.org/debian stable main contrib
deb-src http://deb.debian.org/debian stable main contrib
deb http://deb.debian.org/debian testing main contrib
deb-src http://deb.debian.org/debian testing main contrib
deb http://deb.debian.org/debian unstable main contrib
deb-src http://deb.debian.org/debian unstable main contrib
再重新更新
$ sudo apt update
$ sudo apt upgrade
就解決了問題
個人猜想可能是stable的版本太舊了,所以才在/etc/apt/sources.list
新增unstable跟testing試試看,但實際上為什麼會出現這個問題也不太清楚