Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go import "libguestfs.org/guestfs" #90

Closed
securityforsoftware opened this issue Jun 9, 2022 · 9 comments
Closed

go import "libguestfs.org/guestfs" #90

securityforsoftware opened this issue Jun 9, 2022 · 9 comments

Comments

@securityforsoftware
Copy link

I'm a rookie, while import on goland, the error is
libguestfs.org/guestfs: cannot find module providing package libguestfs.org/guestfs: unrecognized import path "libguestfs.org/guestfs": reading https://libguestfs.org/guestfs?go-get=1: 404 Not Found
thank you

@rwmjones
Copy link
Member

rwmjones commented Jun 9, 2022

It's best to copy the bindings from the source tarball for now. We don't host them anywhere.

@rwmjones rwmjones closed this as completed Jun 9, 2022
@securityforsoftware
Copy link
Author

thank you
after using "sudo yum install libguestfs-tools"
What should I do next to call api in my go program

@rwmjones
Copy link
Member

rwmjones commented Jun 9, 2022

I would suggest getting the source tarball: https://download.libguestfs.org/1.49-development/

Unpack that and you'll find golang bindings in the golang/src/ subdirectory.

@securityforsoftware
Copy link
Author

thank you thank you

@securityforsoftware
Copy link
Author

umm, I copied folder libguestfs.org to src folder,but goland reminds me of my lack of guestfs.h, so I copied guestfs.h in 1.49 to libguestfs.org/guestfs/ ,but goland error:
D:/Program Files (x86)/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lguestfs
collect2.exe: error: ld returned 1 exit status
what should I do next, thank you very much

@securityforsoftware
Copy link
Author

8U3OTZG9}WN3KD2YDW_9V8X

@rwmjones
Copy link
Member

I don't know how golang works, but you should be able to install libguestfs library and headers by doing: sudo yum install libguestfs-devel

@securityforsoftware
Copy link
Author

image

@securityforsoftware
Copy link
Author

thanks ,but after sudo yum install libguestfs-devel,the new error (ㄒoㄒ)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants