path issue after compiling curl
install path
If you don't use configure's --prefix
option, the default installation will happen in /usr/local
so curl ends up at /usr/local/bin/curl
.
symbol lookup error
The symbol it reports to be missing is a recent addition to libcurl, which indicates that you're invoking a new curl tool that loads and uses an older libcurl - ie not the one you just installed but one from a previous (system?) install.
You can verify which libcurl your curl loads by invoking
$ ldd /usr/local/bin/curl | grep libcurl
You can change which libcurl your curl loads in one of several way, neither of which is curl specific so I'll just briefly mention the methods here to be further explained elsewhere:
- Just set
LD_LIBRARY_PATH
in the shell before you invoke curl - Edit
/etc/ld.so.conf
and make sure the order of the search path makes the new libcurl gets found before the old one. - Link your curl executable with a hard coded path to the new libcurl by invoking configure with something like
LDFLAGS=-Wl,-R/usr/local/ssl/lib ./configure ...
replacing the system library?
It is generally not advised to replace the system installed libcurl with your custom build. Mostly because you might have an application or two that depend on specifics of that build. When you install your own libcurl from source, it is generally better to keep it installed in a separate path so that it can co-exist with the one already installed in your syste,.
Compiling php with curl, where is curl installed?
None of these will allow you to compile PHP with cURL enabled.
In order to compile with cURL, you need libcurl header files (.h files). They are usually found in /usr/include/curl
. They generally are bundled in a separate development package.
Per example, to install libcurl in Ubuntu:
sudo apt-get install libcurl4-gnutls-dev
Or CentOS:
sudo yum install curl-devel
Then you can just do:
./configure --with-curl # other options...
If you compile cURL manually, you can specify the path to the files without the lib
or include
suffix. (e.g.: /usr/local
if cURL headers are in /usr/local/include/curl
).
Cross compiled C Windows libcurl doesn't get linked correctly on Ubuntu
So my solution to this problem probably lies right here:
Cross compile tips for libraries
These are some tips and tricks for the cross compilation compiler mingw32 and the compilation of curl with my missing argument -DCURL_STATICLIB. I didn't test this out though because I solved the problem without curl.
Related Topics
Automate Scp with Multiple Files with Expect Script
Linux Patch Ignoring Line Numbers
What Happens Internally When Deleting an Opened File in Linux
When Does a Process Handle a Signal
Does Grub Switch to Protected Mode
Error While Installing Mongodb on Ubuntu 16.04
Replace Forward Slash with Double Backslash Enclosed in Double Quotes
Atomically Swap Contents of Two Files on Linux
Intel Msr Frequency Scaling Per - Thread
Window Placement: Winsplit Revolution -Like Application for Linux (Kde)
Convert Charset from a Entire Project to Utf-8
How to Give Password in Shell Script
Ensure Config.H Is Included Once
Ubuntu/Fedora: How to Add Applications in The Menus
Find Files and Print Only Their Parent Directories
How to Delete All Files Starting with ._ from The Shell in Linux