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

ld: undefined reference to build errors #318

Open
Dentrax opened this issue Dec 3, 2022 · 1 comment
Open

ld: undefined reference to build errors #318

Dentrax opened this issue Dec 3, 2022 · 1 comment

Comments

@Dentrax
Copy link

Dentrax commented Dec 3, 2022

Hey, just hit the following build error while trying to build simple Go program, and literally no idea about the actual problem:

# github.com/iovisor/gobpf/bcc
/usr/bin/ld: warning: libtinfo.so.5, needed by /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libbcc.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libbcc.so: undefined reference to `set_curterm@NCURSES_TINFO_5.0.19991023'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libbcc.so: undefined reference to `tigetnum@NCURSES_TINFO_5.0.19991023'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libbcc.so: undefined reference to `setupterm@NCURSES_TINFO_5.0.19991023'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libbcc.so: undefined reference to `del_curterm@NCURSES_TINFO_5.0.19991023'
collect2: error: ld returned 1 exit status
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.10
Release:	22.10
Codename:	kinetic

Any ideas?

@deliangyang
Copy link

The following commands worked for me @Dentrax

sudo apt install libtinfo5
sudo apt install libtinfo-dev 
sudo apt install libbcc
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

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

2 participants