Answer the question
In order to leave comments, you need to log in
Is it possible to compile PC programs in a virtual machine?
When I tried to assemble gnome commander for myself, I had to pull together a bunch of libraries that are not needed anywhere in everyday life. As a result, I finished the game - somehow I broke the gnome shell. So the idea arose to collect on a separate machine. But, since the laptop is the only one, there is only one option - virtual.
In theory, the processor is the same on the virtual machine, which means that the command system is the same. Is it possible to go through the path to make install on a virtual machine or is it a stupid idea?
Answer the question
In order to leave comments, you need to log in
Yes, you can, especially if it's not low-level, both on your own and on VPS / VDS, and you can also rent a physical dedicated server, there is generally a real machine.
And more to this question:
If I, suppose, when building program "A", launched ./configure and he told me that package "B" was missing. I went and downloaded:
Is this "B" package only needed to compile? Or do I need to shove it onto the system for which I am compiling this program?
You can use chroot.
1) create a disk image for the chroot system.
dd if=/dev/zero of=hdd.iso bs=1M count=4096
losetup /dev/loop0 hdd.iso
mkfs.ext4 /dev/loop0
2) mount the system to this disk using debootstrap, pacstrap, other similar
mount utilities /dev/loop0 /mnt
debootstrap --arch i386 jessie /mnt ftp://ftp.de.debian.org/debian
3)mount /sys /proc /dev to the chroot system
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
mount -o bind /dev /mnt/dev
4) make chroot
chroot /mnt
5) exit chroot when finished and sort everything back.
exit
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt
losetup -d /dev/loop0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question