File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ func (p *ProcessManager) GetBinaryPath(paths *paths.Paths, version string) (stri
137137 return path , nil
138138 }
139139
140- return "" , fmt .Errorf ("%s not found; install QEMU on your system " , binaryName )
140+ return "" , fmt .Errorf ("%s not found; install with: %s " , binaryName , qemuInstallHint () )
141141}
142142
143143// qemuBinaryName returns the QEMU binary name for the host architecture.
@@ -152,6 +152,18 @@ func qemuBinaryName() (string, error) {
152152 }
153153}
154154
155+ // qemuInstallHint returns package installation hints for the current architecture.
156+ func qemuInstallHint () string {
157+ switch runtime .GOARCH {
158+ case "amd64" :
159+ return "apt install qemu-system-x86 (Debian/Ubuntu) or dnf install qemu-system-x86-core (Fedora)"
160+ case "arm64" :
161+ return "apt install qemu-system-arm (Debian/Ubuntu) or dnf install qemu-system-aarch64-core (Fedora)"
162+ default :
163+ return "install QEMU for your platform"
164+ }
165+ }
166+
155167// isSocketInUse checks if a Unix socket is actively being used
156168func isSocketInUse (socketPath string ) bool {
157169 conn , err := net .DialTimeout ("unix" , socketPath , 100 * time .Millisecond )
You can’t perform that action at this time.
0 commit comments