wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.34k stars 1.22k forks source link

Can' install on linux #3491

Closed qomosoloto closed 5 months ago

qomosoloto commented 6 months ago

Description

Can not install wails on archilinux

To Reproduce

  1. Just tried Installing wails using go install github.com/wailsapp/wails/v2/cmd/wails@latest
  2. But got error like this:
    ❯ go install github.com/wailsapp/wails/v2/cmd/wails@latest
    go: finding module for package github.com/labstack/gommon/color
    go: finding module for package golang.org/x/mod/internal/lazyregexp
    go: finding module for package github.com/yuin/goldmark/extension/ast
    go: finding module for package github.com/mattn/go-runewidth
    go: finding module for package github.com/sergi/go-diff/diffmatchpatch
    go: finding module for package golang.org/x/mod/semver
    go: finding module for package github.com/yuin/goldmark/ast
    go: finding module for package golang.org/x/mod/module
    go: finding module for package golang.org/x/exp/constraints
    go: found github.com/labstack/gommon/color in github.com/labstack/gommon v0.4.2
    go: found github.com/mattn/go-runewidth in github.com/mattn/go-runewidth v0.0.15
    go: found golang.org/x/mod/semver in golang.org/x/mod v0.17.0
    go: found golang.org/x/exp/constraints in golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
    go: found github.com/sergi/go-diff/diffmatchpatch in github.com/sergi/go-diff v1.3.1
    go: found golang.org/x/mod/internal/lazyregexp in golang.org/x/mod v0.17.0
    go: found golang.org/x/mod/module in golang.org/x/mod v0.17.0
    go: found github.com/yuin/goldmark/ast in github.com/yuin/goldmark v1.7.1
    go: found github.com/yuin/goldmark/extension/ast in github.com/yuin/goldmark v1.7.1
    github.com/labstack/gommon/color: no non-test Go files in /home/matrixer/go/pkg/mod/github.com/labstack/gommon@v0.4.2/color
    github.com/leaanthony/debme: no non-test Go files in /home/matrixer/go/pkg/mod/github.com/leaanthony/debme@v1.2.1
    github.com/leaanthony/gosod: no non-test Go files in /home/matrixer/go/pkg/mod/github.com/leaanthony/gosod@v1.0.3
    github.com/lithammer/fuzzysearch/fuzzy: no non-test Go files in /home/matrixer/go/pkg/mod/github.com/lithammer/fuzzysearch@v1.1.5/fuzzy
    # github.com/rivo/uniseg
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:13:19: undefined: prN
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:14:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:15:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:16:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:17:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:18:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:19:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:20:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:21:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:22:19: undefined: prNa
    go/pkg/mod/github.com/rivo/uniseg@v0.4.4/eastasianwidth.go:22:19: too many errors
    # github.com/lucasb-eyer/go-colorful
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/colorgens.go:10:22: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/colorgens.go:20:21: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/colorgens.go:26:19: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/colorgens.go:34:23: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/colorgens.go:44:22: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/colorgens.go:50:19: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/happy_palettegen.go:10:50: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/happy_palettegen.go:19:39: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/hsluv.go:83:29: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/hsluv.go:94:29: undefined: Color
    go/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.2.0/hsluv.go:94:29: too many errors
    # gopkg.in/yaml.v2
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:8:43: undefined: yaml_parser_t
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:9:17: undefined: yaml_READER_ERROR
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:25:45: undefined: yaml_parser_t
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:38:21: undefined: yaml_UTF16LE_ENCODING
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:42:21: undefined: yaml_UTF16BE_ENCODING
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:46:21: undefined: yaml_UTF8_ENCODING
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:50:21: undefined: yaml_UTF8_ENCODING
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:56:44: undefined: yaml_parser_t
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:91:40: undefined: yaml_parser_t
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:116:24: undefined: yaml_ANY_ENCODING
    go/pkg/mod/gopkg.in/yaml.v2@v2.4.0/readerc.go:116:24: too many errors
    # atomicgo.dev/cursor
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:11:3: undefined: Down
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:19:2: undefined: HorizontalAbsolute
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:24:2: undefined: Down
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:30:2: undefined: Up
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:36:2: undefined: Up
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:37:2: undefined: ClearLine
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:42:2: undefined: Down
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:43:2: undefined: ClearLine
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:49:3: undefined: Right
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:52:3: undefined: Left
    go/pkg/mod/atomicgo.dev/cursor@v0.1.1/utils.go:52:3: too many errors
    # github.com/pkg/browser
    go/pkg/mod/github.com/pkg/browser@v0.0.0-20210911075715-681adbf594b8/browser_linux.go:16:11: undefined: runCmd
    # github.com/wailsapp/wails/v2/internal/fs
    go/pkg/mod/github.com/wailsapp/wails/v2@v2.8.2/internal/fs/fs.go:180:49: undefined: slicer.StringSlicer
    go/pkg/mod/github.com/wailsapp/wails/v2@v2.8.2/internal/fs/fs.go:181:20: undefined: slicer.StringSlicer
    go/pkg/mod/github.com/wailsapp/wails/v2@v2.8.2/internal/fs/fs.go:287:23: undefined: slicer.String
    go/pkg/mod/github.com/wailsapp/wails/v2@v2.8.2/internal/fs/fs.go:350:24: undefined: slicer.StringSlicer
    # github.com/olekukonko/tablewriter
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:328:45: undefined: Colors
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:345:13: undefined: format
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:433:13: undefined: Pad
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:436:13: undefined: PadRight
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:438:13: undefined: PadLeft
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:470:22: undefined: ConditionString
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:481:9: undefined: Title
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:483:11: undefined: ConditionString
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:485:11: undefined: ConditionString
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:490:7: undefined: format
    go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.5/table.go:490:7: too many errors
    # github.com/samber/lo
    go/pkg/mod/github.com/samber/lo@v1.38.1/math.go:8:12: undefined: If
    go/pkg/mod/github.com/samber/lo@v1.38.1/math.go:10:10: undefined: If
    go/pkg/mod/github.com/samber/lo@v1.38.1/math.go:20:12: undefined: If
    go/pkg/mod/github.com/samber/lo@v1.38.1/math.go:22:10: undefined: If
    # github.com/containerd/console
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:29:12: undefined: openpt
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:65:9: undefined: tcswinsz
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:80:9: undefined: tcset
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:85:12: undefined: tcget
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:96:13: undefined: cfmakeraw
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:98:9: undefined: tcset
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:107:9: undefined: tcset
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:111:9: undefined: tcgwinsz
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:125:5: undefined: tcget
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:149:9: undefined: setONLCR
    go/pkg/mod/github.com/containerd/console@v1.0.3/console_unix.go:149:9: too many errors
  3. System info: image

Expected behaviour

Wails should be installed successfully.

Screenshots

No response

Attempted Fixes

  1. Tried removing director go/pkg/mod/github.com, but nothing worked.
  2. Tried changing wails version, but nothing helped.
  3. Tried reinstalling go, still same error

System Details

image

image

Sorry, wails could not be installed.

Additional context

No response

mateothegreat commented 6 months ago

Smells like a go version problem (older than newer)..

Share:

echo $GOROOT
echo $GOPATH
echo $PATH
which go
go version

I'm unable to reproduce on latest arch:

~/workspace/wails/svelte ➜ docker run -it --platform linux/amd64 archlinux bash
[root@0faa4ec370ec /]# pacman -Sy go
:: Synchronizing package databases...
 core downloading...
 extra downloading...
resolving dependencies...
looking for conflicting packages...

Package (1)  New Version  Net Change  Download Size

extra/go     2:1.22.3-1   209.54 MiB      38.45 MiB

Total Download Size:    38.45 MiB
Total Installed Size:  209.54 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 go-2:1.22.3-1-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing go...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[root@0faa4ec370ec /]# go install github.com/wailsapp/wails/v2/cmd/wails@latest
go: downloading github.com/wailsapp/wails/v2 v2.8.2
go: downloading github.com/wailsapp/wails v1.16.9
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/leaanthony/clir v1.3.0
go: downloading github.com/leaanthony/gosod v1.0.3
go: downloading github.com/leaanthony/debme v1.2.1
go: downloading github.com/labstack/gommon v0.4.0
go: downloading github.com/flytam/filenamify v1.0.0
go: downloading github.com/jaypipes/ghw v0.12.0
go: downloading github.com/leaanthony/slicer v1.6.0
go: downloading github.com/pterm/pterm v0.12.49
go: downloading github.com/tidwall/sjson v1.1.7
go: downloading github.com/samber/lo v1.38.1
go: downloading github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
go: downloading github.com/fsnotify/fsnotify v1.4.9
go: downloading github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
go: downloading github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
go: downloading github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
go: downloading golang.org/x/mod v0.14.0
go: downloading golang.org/x/sys v0.20.0
go: downloading github.com/wzshiming/ctc v1.2.3
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/charmbracelet/glamour v0.5.0
go: downloading github.com/jackmordaunt/icns v1.0.0
go: downloading github.com/leaanthony/winicon v1.0.0
go: downloading github.com/tc-hib/winres v0.2.1
go: downloading github.com/go-git/go-git/v5 v5.11.0
go: downloading github.com/tidwall/gjson v1.9.3
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mattn/go-isatty v0.0.19
go: downloading golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
go: downloading atomicgo.dev/cursor v0.1.1
go: downloading atomicgo.dev/keyboard v0.2.8
go: downloading github.com/gookit/color v1.5.2
go: downloading github.com/lithammer/fuzzysearch v1.1.5
go: downloading github.com/mattn/go-runewidth v0.0.13
go: downloading golang.org/x/term v0.20.0
go: downloading golang.org/x/text v0.15.0
go: downloading github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae
go: downloading golang.org/x/tools v0.17.0
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading golang.org/x/image v0.12.0
go: downloading github.com/ghodss/yaml v1.0.0
go: downloading github.com/jaypipes/pcidb v1.0.0
go: downloading github.com/tidwall/match v1.1.1
go: downloading github.com/tidwall/pretty v1.2.0
go: downloading github.com/containerd/console v1.0.3
go: downloading github.com/rivo/uniseg v0.4.4
go: downloading github.com/muesli/termenv v0.9.0
go: downloading github.com/yuin/goldmark v1.4.13
go: downloading github.com/yuin/goldmark-emoji v1.0.1
go: downloading github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778
go: downloading dario.cat/mergo v1.0.0
go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371
go: downloading github.com/go-git/go-billy/v5 v5.5.0
go: downloading github.com/sergi/go-diff v1.2.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/alecthomas/chroma v0.10.0
go: downloading github.com/microcosm-cc/bluemonday v1.0.17
go: downloading github.com/muesli/reflow v0.3.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/cyphar/filepath-securejoin v0.2.4
go: downloading github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376
go: downloading github.com/pjbgf/sha1cd v0.3.0
go: downloading github.com/emirpasic/gods v1.18.1
go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
go: downloading golang.org/x/crypto v0.23.0
go: downloading github.com/aymerick/douceur v0.2.0
go: downloading golang.org/x/net v0.25.0
go: downloading github.com/dlclark/regexp2 v1.4.0
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading github.com/skeema/knownhosts v1.2.1
go: downloading github.com/xanzy/ssh-agent v0.3.3
go: downloading gopkg.in/warnings.v0 v0.1.2
go: downloading github.com/cloudflare/circl v1.3.7
go: downloading github.com/gorilla/css v1.0.0
[root@0faa4ec370ec /]# ~/go/bin/wails doctor

          Wails Doctor          

# Wails
Version         | v2.8.2
Package Manager | pacman

# System
WARNING: 
Could not determine total physical bytes of memory. This may
be due to the host being a virtual machine or container with no
/var/log/syslog file or /sys/devices/system/memory directory, or
the current user may not have necessary privileges to read the syslog.
We are falling back to setting the total physical amount of memory to
the total usable amount of memory
┌──────────────────────────────────┐
| OS           | Arch Linux        |
| Version      | 20240101.0.204074 |
| ID           | arch              |
| Go Version   | go1.22.3          |
| Platform     | linux             |
| Architecture | amd64             |
| CPU          |                   |
| Memory       | 31GB              |
└──────────────────────────────────┘

# Dependencies
┌──────────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version                  |
| *docker    | docker       | Available | 1:26.1.3-1               |
| gcc        | gcc          | Available | 14.1.1+r1+g43b730b9134-1 |
| libgtk-3   | gtk3         | Available | 1:3.24.42-1              |
| libwebkit  | webkit2gtk   | Available | 2.44.1-1                 |
| npm        | npm          | Available | 10.8.0-1                 |
| pkg-config | pkgconf      | Available | 2.1.1-1                  |
└──────────────────── * - Optional Dependency ─────────────────────┘

# Diagnosis
Required package(s) installation details: 
  - gcc: sudo pacman -S gcc
  - libgtk-3: sudo pacman -S gtk3
  - libwebkit: sudo pacman -S webkit2gtk
  - npm: sudo pacman -S npm
  - pkg-config: sudo pacman -S pkgconf

Optional package(s) installation details: 
  - docker: sudo pacman -S docker

 WARNING  Your system has missing dependencies!

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
[root@0faa4ec370ec /]# 
qomosoloto commented 5 months ago

Well, everything okay now...