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

Can't install package #831

Closed
puresoul opened this issue Jul 9, 2018 · 3 comments
Closed

Can't install package #831

puresoul opened this issue Jul 9, 2018 · 3 comments

Comments

@puresoul
Copy link

puresoul commented Jul 9, 2018

Issue description

Hi, can't install package with go get. It's me doing something wrong? Please help, thanks...

ii  golang                        2:1.7~5                        amd64        Go programming language compiler - metapackage
ii  golang-1.7                    1.7.4-2                        all          Go programming language compiler - metapackage
ii  golang-1.7-doc                1.7.4-2                        all          Go programming language - documentation
ii  golang-1.7-go                 1.7.4-2                        amd64        Go programming language compiler, linker, compiled stdlib
ii  golang-1.7-src                1.7.4-2                        amd64        Go programming language - source files
ii  golang-doc                    2:1.7~5                        all          Go programming language - documentation
ii  golang-go                     2:1.7~5                        amd64        Go programming language compiler, linker, compiled stdlib
ii  golang-src                    2:1.7~5                        amd64        Go programming language - source files

root@datacolect:/usr/share/go-1.7/src# env
MC_SID=841
LANG=en_US.UTF-8
HISTCONTROL=ignoreboth
OLDPWD=/usr/share/go-1.7/src/database
MC_TMPDIR=/tmp/mc-root
USER=root
GOPATH=/opt/go
PWD=/usr/share/go-1.7/src
HOME=/root
MAIL=/var/mail/root
TERM=xterm-256color
SHELL=/bin/bash
SHLVL=2
LANGUAGE=en_US:en
LOGNAME=root
GOBIN=/opt/go/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/go/bin
_=/usr/bin/env

root@datacolect:/usr/share/go-1.7/src# go get -u github.com/go-sql-driver/mysql
# github.com/go-sql-driver/mysql
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:485: undefined: driver.TxOptions
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:491: undefined: sql.IsolationLevel
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:491: undefined: sql.LevelDefault
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:505: undefined: driver.NamedValue
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:524: undefined: driver.NamedValue
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:558: undefined: driver.NamedValue
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:577: undefined: driver.NamedValue
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:642: undefined: driver.NamedValue
/opt/go/src/github.com/go-sql-driver/mysql/utils.go:730: undefined: driver.NamedValue
/opt/go/src/github.com/go-sql-driver/mysql/utils.go:742: undefined: driver.IsolationLevel
/opt/go/src/github.com/go-sql-driver/mysql/connection.go:491: too many errors
root@datacolect:/usr/share/go-1.7/src# 

Configuration

*Linux datacolect 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux

@methane
Copy link
Member

methane commented Jul 9, 2018

Go 1.7 is not supported. You need to install Go from golang.org, not from yum or apt.

@methane methane closed this as completed Jul 9, 2018
@puresoul
Copy link
Author

puresoul commented Jul 9, 2018

ok, thx for help

@ev-smolin
Copy link

ev-smolin commented Oct 8, 2018

In Debian-based distro you can try to find compatible official debian package with older version of library.
For example for me with Debian 9 and go 1.7.4 worked:
sudo apt-get install golang-github-go-sql-driver-mysql-dev and then add /usr/share/gocode to your GOPATH

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