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

easy.h should be in <curl-dir>/include/curl/ #861

Closed
MaxHogervorst opened this issue Apr 16, 2017 · 20 comments
Closed

easy.h should be in <curl-dir>/include/curl/ #861

MaxHogervorst opened this issue Apr 16, 2017 · 20 comments

Comments

@MaxHogervorst
Copy link

Output

# WARNING: curl extension might be required for fetching data.
===> phpbrew will now build 7.1.3
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: 1306085cf74ba682dbcbfb4dff67b650
===> Distribution file was successfully extracted, skipping...
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/home/max/.phpbrew/build/php-7.1.3' --quiet 'clean'
===> Checking patches...
Checking patch for replace apache php module name with custom version name
Found existing build.log, renaming it to /home/max/.phpbrew/build/php-7.1.3/build.log.1492332124
===> Configuring 7.1.3...


Use tail command to see what's going on:
   $ tail -F /home/max/.phpbrew/build/php-7.1.3/build.log


Error: Configure failed:
The last 5 lines in the log file:
checking whether to enable ctype functions... yes

checking for cURL support... yes

checking for cURL in default path... not found

configure: error: Please reinstall the libcurl distribution -

    easy.h should be in <curl-dir>/include/curl/

Please checkout the build log file for more details:
	 tail /home/max/.phpbrew/build/php-7.1.3/build.log

Expected Result

php-7.1.3 installed

Command

phpbrew install php-7.1.3 +dbs +mb +default

Build Log

https://gist.github.com/MaxHogervorst/1108ae9ce1a4d4a39d1f8bdd29dbb59e

Platform

OS:

Ubuntu 17.04

Running PHP: 7.1.0

Installing PHP: 7.1.3

This happens with anyversion i try

i've tried installing sudo apt-get install libcurl4-gnutls-dev and all the other versions of libcurl4

@mahagr
Copy link

mahagr commented Apr 18, 2017

I was getting the same issue after updating to Ubuntu 17.04. Looks like curl is located now in /usr/include/x86_64-linux-gnu/curl. As a temporary solution I symlinked the file:

cd /usr/include
sudo ln -s x86_64-linux-gnu/curl

@MaxHogervorst
Copy link
Author

workaround -> uninstall all libcurl libs like libcurl4-gnutls-dev
phpbrew install php-7.1.3 +dbs +mb +default
and then install libcurl again

@morozov
Copy link
Contributor

morozov commented May 5, 2017

Looks like the proper place to fix it is PHP itself: https://bugs.php.net/bug.php?id=74125.

@Oxicode
Copy link

Oxicode commented Jun 21, 2017

me too

@Oxicode
Copy link

Oxicode commented Jun 21, 2017

Fix

  1. cd /usr/local/include sudo ln -s /usr/include/x86_64-linux-gnu/curl curl
  2. sudo apt-get install libcurl4-gnutls-dev

@timucingelici
Copy link

You can include the curl path with +curl=/path/to/libcurl/installation

The following has solved the problem for me on OSX after installing curl with brew

phpbrew install 7.1.7 +curl=/usr/local/opt/curl

@morozov
Copy link
Contributor

morozov commented Oct 21, 2017

#74125 is fixed in PHP 7.2. Anyone wants to verify the fix?

@dserodio
Copy link

@timucingelici's workaround didn't work for me on Ubuntu 17.10:

$ phpbrew install 5.4.45 +curl=/usr/include/x86_64-linux-gnu/curl

...

Error: Configure failed:
The last 5 lines in the log file:
checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
$ ls -l /usr/include/x86_64-linux-gnu/curl/easy.h

-rw-r--r-- 1 root root 3.4K nov 28 10:59 /usr/include/x86_64-linux-gnu/curl/easy.h

@mdlscientist
Copy link

mdlscientist commented Jan 1, 2018

First, I just want to say, I'm still kinda new here as where I'm sure most of you have been here much longer, but the more i use GitHub to fill in the gaps, the more I appreciate it. As it was pointed out here to us... Canonical - pulled a fast one on us when they moved the Curl Directory. Thank you Oxicode for post commented on Jun 21, 2017 - your symbolic link got me past the Curl Hurtle

@jayantrane
Copy link

Solved:
sudo apt-get install libcurl4-openssl-dev

@OnyekaIjeh
Copy link

Didn't work for me

@logical-and
Copy link

^ the same

@logical-and
Copy link

I've solved by #925 (comment)

@amirouche
Copy link

On Ubuntu bionic 18.04 LTS, install php 5.6 I got the following error:

configure: error: Please reinstall the libcurl distribution -

    easy.h should be in <curl-dir>/include/curl/

To fix it, I installed libcurl4-openssl-dev and symlinked the directory that contains curl headers:

/usr/local/include$ sudo ln -s /usr/include/x86_64-linux-gnu/curl/

Then I installed php 5.6 with the following command:

phpbrew install 5.6 +curl

@Michael-LiK
Copy link

Fix

  1. cd /usr/local/include sudo ln -s /usr/include/x86_64-linux-gnu/curl curl
  2. sudo apt-get install libcurl4-gnutls-dev

nice ,you help me solve the same problem.

@rfay
Copy link

rfay commented Jul 29, 2019

I think several of these "solutions" solve this for newer PHP versions, but not for older PHP versions being built on reasonably recent Debian/Ubuntu. For example, none of them seem to solve the problem to allow building php5.4 on Debian Stretch.

@codeasashu
Copy link

I my case (MacOS Mojave), I had to use this to work with php 5.6.40:

phpbrew install --jobs=$(sysctl -n hw.ncpu) 5.6 \
    +default+mysql \
    +iconv="$(brew --prefix libiconv)" \
    +bz2="$(brew --prefix bzip2)" \
    +zlib="$(brew --prefix zlib)" \
    +curl="$(brew --prefix curl)"

@Kristories
Copy link

phpbrew install --jobs=$(sysctl -n hw.ncpu) 5.6 \
    +default+mysql \
    +iconv="$(brew --prefix libiconv)" \
    +bz2="$(brew --prefix bzip2)" \
    +zlib="$(brew --prefix zlib)" \
    +curl="$(brew --prefix curl)"

@codeasashu Exception: Variant "default+mysql" is not defined

@smola
Copy link
Contributor

smola commented Jul 23, 2020

Added a section to the troubleshooting guide: https://github.com/phpbrew/phpbrew/wiki/Troubleshooting#on-ubuntu-2004-easyh-should-be-in-curl-dirincludecurl
I used the fix by @mahagr and @Oxicode, which works fine on Ubuntu 20.04.

cbleek added a commit to yawik/Solr that referenced this issue Sep 17, 2020
@FosterG4
Copy link

FosterG4 commented Nov 1, 2020

Fix

1. cd `/usr/local/include` `sudo ln -s /usr/include/x86_64-linux-gnu/curl curl`

2. `sudo apt-get install libcurl4-gnutls-dev`

this work for me on ubuntu 18.04 LTS

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

No branches or pull requests