tomnomnom / hacks

A collection of hacks and one-off scripts
2.12k stars 633 forks source link

html-tool installation problem #48

Closed daffi1238 closed 2 years ago

daffi1238 commented 2 years ago

I'm trying to install html-tool with go install github.com/tomnomnom/hacks/html-tool@latest

but I'm getting in return:

go: finding module for package golang.org/x/net/html
go: finding module for package github.com/ericchiang/css
go: finding module for package github.com/tomnomnom/gahttp
go: found github.com/ericchiang/css in github.com/ericchiang/css v1.1.0
go: found github.com/tomnomnom/gahttp in github.com/tomnomnom/gahttp v0.0.0-20180905143706-793a49d82336
go: found golang.org/x/net/html in golang.org/x/net v0.0.0-20220111093109-d55c255bac03
# github.com/tomnomnom/hacks/html-tool
../../../go-workspace/pkg/mod/github.com/tomnomnom/hacks@v0.0.0-20210604135613-352c68ebc565/html-tool/main.go:22:14: undefined: css.Compile
../../../go-workspace/pkg/mod/github.com/tomnomnom/hacks@v0.0.0-20210604135613-352c68ebc565/html-tool/main.go:27:12: cannot assign error to err in multiple assignment

I don't use go enough but I think that this could be abount dependencies, some advice to confirm this or how to solve?

Greeting and thank you all.

lkz0ne commented 2 years ago

47

I do have the same problem

daffi1238 commented 2 years ago

I receive a notification form PinkDev1 that solve my question, I'm not sure why the answer is not here but I post to everybody as me You need to have go installed: sudo apt install go

just do:

git clone https://github.com/tomnomnom/hack tomnomnom_hacks cd tomnomnom_hacks cd html-tool go build main.go mv main.go html-tool chmod +x html-tool mv html-tool /usr/bin cd .. cd .. rm -rf tomnomnom_hacks

Here's the same command in a single line:

git clone https://github.com/tomnomnom/hack tomnomnom_hacks && cd tomnomnom_hacks && cd html-tool && go build main.go && mv main.go html-tool && chmod +x html-tool && mv html-tool /usr/bin && cd .. && cd .. && rm -rf tomnomnom_hacks

Whith this I considered solver and close the issue!

Thank you!!