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

how install lazypdf #51

Closed
TimRazumov opened this issue Jun 8, 2021 · 10 comments
Closed

how install lazypdf #51

TimRazumov opened this issue Jun 8, 2021 · 10 comments

Comments

@TimRazumov
Copy link

hello. please tell me how to install your library

go get github.com/Nitro/lazypdf

go: finding github.com/Nitro/lazypdf latest
# github.com/Nitro/lazypdf
In file included from ../../go/pkg/mod/github.com/!nitro/lazypdf@v0.0.0-20210520115849-07e6e4093e3c/faster_raster.go:29:
./faster_raster.h:1:10: fatal error: pdf.h: No such file or directory
    1 | #include <pdf.h>
      |          ^~~~~~~
compilation terminated.
@diegobernardes
Copy link
Contributor

diegobernardes commented Jun 9, 2021

Which OS and Go version are you using? It should work as a normal Go package if you're using Linux or Mac.

@TimRazumov
Copy link
Author

linux - ubuntu 20

@diegobernardes
Copy link
Contributor

diegobernardes commented Jun 9, 2021

I think I know what is the problem, it's because of the Go module name. Try this: go get github.com/nitro/lazypdf.

@diegobernardes
Copy link
Contributor

@TimRazumov is your problem solved? Let me know of your experience with the library and if you find any bugs.

@TimRazumov
Copy link
Author

hello @diegobernardes. no matter how I try, I can not download your library through 'go get'.
it seems to me that there are some problems inside your go.mod. I forked the library, but it can't build either

@TimRazumov
Copy link
Author

can you install the latest package in any external project?

@diegobernardes
Copy link
Contributor

diegobernardes commented Jun 10, 2021

Yes. It works for me locally on a macOS and I'm also running on linux servers. I'll try to find the problem and let you know. It should be something with the Go module name. Try to fork and change, it may work for you and if it works, let me know so I can fix the lib for others.

@PKRoma
Copy link

PKRoma commented Jun 11, 2021

Could the problem be related to the spelling of the company name 'Nitro' with a leading capital letter? URL's should not contain capital letters, or at least, shouldn't care, so there is a problem if the 'N' must be upper case. I wonder if there is confusion within the package as to which case is used where? I notice that within the go subtree I've got both a 'pkg/mod/cache/download/github.com/nitro' and a 'pkg/mod/cache/download/github.com/!nitro' subdirectory, where I believe that the leading '!' is supposed to indicate upper case for the succeeding letter.

@diegobernardes
Copy link
Contributor

diegobernardes commented Jun 16, 2021

@TimRazumov sorry for the delay. I did mislead you with the wrong go get command, can you please try go get github.com/nitro/lazypdf/v2? Without the /v2 it goes to the old version that is very problematic.

It's working for me:

➜  ~ docker run --rm -it golang:1.16-buster
root@be69190dc4b5:/go# uname -a
Linux be69190dc4b5 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 GNU/Linux
root@be69190dc4b5:/go# go get github.com/nitro/lazypdf/v2
go: downloading github.com/nitro/lazypdf/v2 v2.0.0-20210616103603-5a7b00b7226b
go: downloading github.com/nitro/lazypdf v0.0.0-20210520115849-07e6e4093e3c
go: downloading gopkg.in/DataDog/dd-trace-go.v1 v1.31.1
go: downloading github.com/DataDog/sketches-go v1.0.0
go: downloading golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
go: downloading github.com/tinylib/msgp v1.1.5
go: downloading golang.org/x/sys v0.0.0-20210601080250-7ecdf8ef093b
go: downloading github.com/DataDog/datadog-go v4.7.0+incompatible
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading google.golang.org/protobuf v1.26.0
go: downloading github.com/google/uuid v1.2.0
go: downloading github.com/Microsoft/go-winio v0.5.0
go: downloading github.com/philhofer/fwd v1.1.1
root@be69190dc4b5:/go# echo $?
0

@PKRoma, for sure the problem was the wrong command I gave him 🤦🏻‍♂️

@diegobernardes
Copy link
Contributor

I'm closing this issue. @TimRazumov, if you still have questions feel free to open it again.

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

3 participants