Skip to content

Instantly share code, notes, and snippets.

@sinamajidian
Created December 5, 2024 17:50
Show Gist options
  • Save sinamajidian/dba5b81a1b6452a3ad7ed18354b5b4bb to your computer and use it in GitHub Desktop.
Save sinamajidian/dba5b81a1b6452a3ad7ed18354b5b4bb to your computer and use it in GitHub Desktop.
cannot find -lcurl

I faced with this error several times and searching on the net only results in using sudo apt-get.

/usr/bin/ld: cannot find -lcurl
/usr/bin/ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
conda install -c anaconda libcurl bzip2

export LIBRARY_PATH="$LIBRARY_PATH:/path/to/miniconda3/envs/imp/lib
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/miniconda3/envs/imp/lib

Now I have

$ rpm -qa | grep curl                                                                                         
cm-curl-7.80.0-100152_cm9.2_a95fc39ed1.x86_64
libcurl-7.61.1-30.el8_8.3.x86_64
curl-7.61.1-30.el8_8.3.x86_64

You need to change path/to. Thanks to Kavya who told me the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment