<div dir="ltr">Thanks, once again that seems to have got me past that problem, only for a new one to crop up (this time hivex, which I'm not sure how to build or why it's required on Linux). I take it this isn't really an expected workflow, trying to get the package to build without being able to use a package manager to install the dependencies?<div><br></div><div>Searching the output from ./configure, I can't yet see any mention of quite a few of the other dependencies listed at <a href="https://libguestfs.org/guestfs-building.1.html">https://libguestfs.org/guestfs-building.1.html</a> that may be problematic, so I'm wondering if it's time to throw in the towel for this approach.</div><div><br></div><div>All I'm looking for really is a way to programmatically edit a single file in a qcow2 VM image (which I planned to achieve with virt-edit) - is there an easier way to do this? Does virt-edit alone require all these dependencies, or would there be a way to build just virt-edit without pulling apart the build system?</div><div><br></div><div>Alternatively, would it be possible/easier to build a static virt-edit binary in a CentOS 7 VM that could simply be copied onto this RHEL 7 machine?</div><div><br></div><div>I appreciate your help so far and any further suggestions you might have!</div><div><br></div><div>Thanks,</div><div>Lewis</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 2 May 2021 at 09:28, Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, May 02, 2021 at 12:14:19AM +0100, Lewis Gaul wrote:<br>
> LIBRARY_PATH=~/.local/lib64 doesn't seem to work either unfortunately (still<br>
> unable to find libmagic). Any other ideas (even if I need to edit a file and<br>
> rerun autoconf or something)?<br>
...<br>
> Unfortunately m4/guestfs-libraries.m4 is using AC_CHECK_LIB instead of<br>
> PKG_CHECK_MODULES, so you cannot just set PKG_CONFIG_* environment<br>
> variables to pick up the right libmagic.pc (which is a bug in<br>
> libguestfs).<br>
<br>
Take a look at m4/guestfs-libraries.m4 and change the AC_CHECK_LIB to<br>
PKG_CHECK_MODULES, following examples of other package tests in that<br>
file, then re-run "autoconf".<br>
<br>
Rich.<br>
<br>
-- <br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
virt-p2v converts physical machines to virtual machines. Boot with a<br>
live CD or over the network (PXE) and turn machines into KVM guests.<br>
<a href="http://libguestfs.org/virt-v2v" rel="noreferrer" target="_blank">http://libguestfs.org/virt-v2v</a><br>
<br>
</blockquote></div>