Comments (10)
install https://www.msys2.org/
use this link for reference: https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2
On the MSYS2 terminal, you want to install pkg-config:
pacman -S pkg-config
Install libvips, but you need exactly this version:
https://github.com/libvips/libvips/releases/tag/v8.12.0
add it to your path and run:
vips --version
Then, run on cmd:
set PKG_CONFIG_PATH=C:\Users\You\Path\To\vips-dev-8.12\lib\pkgconfig
Confirm that it worked by running:
pkg-config --list-all
Now you should be able to use bimg.
from bimg.
You need cgo enabled to use bimg, you won't be able to run it with CGO_ENABLED=0.
As for the docker issue, it seems to be related to docker and not libvips or bimg. It may be an issue with CRLF/LF:
https://stackoverflow.com/questions/68881023/docker-standard-init-linux-go228-exec-user-process-caused-no-such-file-or-dir
I also spent too much time trying to make it work 😅
from bimg.
OK, this is how I fix it. I use WSL and try to run it I get the same thing. then I install pkg-config I get another error something like pkg-config vips vips vips
and I install libvips-dev and it work now :)
from bimg.
@margen2 OH MY GOD THANK YOU I GOT THIS WORKING
Also... This is unrelated, but I don't think it worth creating another topic: while I was trying to solve this problem, I've tried to run everything inside of a docker container and the problem there was that I had to disable cgo for some reason (ENV CGO_ENABLED=0). If I disable it, errors was in bimg:
#11 2.353 # github.com/h2non/bimg
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:93:49: undefined: Gravity
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:133:29: undefined: Watermark
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:139:34: undefined: WatermarkImage
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:152:26: undefined: Angle
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:181:31: undefined: Interpretation
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:202:27: undefined: Options
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:212:29: undefined: ImageMetadata
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:218:35: undefined: Interpretation
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/image.go:234:25: undefined: ImageSize
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/resize.go:11:27: undefined: Options
#11 2.353 /go/pkg/mod/github.com/h2non/[email protected]/resize.go:11:27: too many errors
But if I didn't I will get this error, even though the container build successfully:
standard_init_linux.go:228: exec user process caused: no such file or directory
from bimg.
@margen2 After all of that I'm still getting fatal error: vips/vips.h: No such file or directory
. When i run pkg-config --list-all
it shows vips
in the list.
from bimg.
@etareduction I have just tried following those steps on a fresh win10 computer and it worked as expected. I remember seeing this error while trying to use a different version of libvips, I used this version: https://github.com/libvips/build-win64-mxe/releases/download/v8.12.0/vips-dev-w64-all-8.12.0.zip and make sure to uninstall any other version you may have left.
With go 1.20 cgo may be disabled on your machine, confirm that it is set to CGO_ENABLED=1.
from bimg.
@margen2 Yeah, I've installed only version 8.12.0 and i'm sure cgo is enabled.
Edit: Now when i looked at it, it seems I've installed web
version, not all
. Can that be a problem? I would like to use web
one cause that's what i would use in production anyways.
from bimg.
@etareduction I would at least try again with the all
version just to confirm.
from bimg.
@etareduction I would at least try again with the
all
version just to confirm.
I'm not sure if i could find time for that right now, pretty busy at my project. For the time being, I've workaround this issue by using WSL and installing libvips from apt.
from bimg.
For me it is the same with all, this is what I get
from bimg.
Related Issues (20)
- Are custom image rotation angles possible?
- Is there a way to deskew an image?
- Is there a plan for a new stable tag? HOT 1
- runtime: program exceeds 10000-thread limit fatal error: thread exhaustion HOT 1
- build fails when i add the package to go.mod HOT 2
- Factor calculate mistake
- Basic setup for Prometheus metrics
- Build fails with latest vips library HOT 8
- convert gif to webp
- does bimg have any mem leaks? HOT 1
- Panic Error on Exif Data for Software
- Docker build problem: undefined: io.ReadAll
- Can't build from source locally
- avif encoding
- fatal error: vips/vips.h: No such file or directory
- Page Geometry wrong after watermark
- Use new "keep" option instead of "strip" option
- Add support for passing intent when converting color profiles
- Memory consumption issue when processing images HOT 3
- [Help] Is it possible to blur only part of an image?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bimg.