Answer the question
In order to leave comments, you need to log in
How to know if curl is installed with openssl and zlib support? How to install curl from sources with openssl and zlib support?
When running codeception tests, an error occurs:
$ vendor/bin/codecept run
Codeception PHP Testing Framework v2.1.0
Powered by PHPUnit 4.2.0 by Sebastian Bergmann.
Unit Tests (0) ------------------------------
---------------------------------------------
Functional Tests (0) ------------------------
---------------------------------------------
Acceptance Tests (1) ----------------------------------------------------------------------------------------
Trying to perform actions and see result (testCept) Error
-------------------------------------------------------------------------------------------------------------
Time: 105 ms, Memory: 5.00Mb
There was 1 error:
---------
1) Failed to perform actions and see result in testCept (/home/krll/projects/test/tests/acceptance/testCept.php)
Can't be on page "/hello/world":
GuzzleHttp\Exception\RequestException: [curl] (#7) See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of cURL errors [url] http://localhost:9000/hello/world
Scenario Steps:
1. I am on page "/hello/world"
#1 /home/krll/projects/test/vendor/guzzlehttp/guzzle/src/Adapter/Curl/MultiAdapter.php:176
#2 /home/krll/projects/test/vendor/guzzlehttp/guzzle/src/Adapter/Curl/MultiAdapter.php:160
#3 /home/krll/projects/test/vendor/guzzlehttp/guzzle/src/Adapter/Curl/MultiAdapter.php:139
#4 /home/krll/projects/test/vendor/guzzlehttp/guzzle/src/Adapter/Curl/MultiAdapter.php:103
#5 /home/krll/projects/test/vendor/guzzlehttp/guzzle/src/Adapter/StreamingProxyAdapter.php:34
#6 /home/krll/projects/test/vendor/guzzlehttp/guzzle/src/Client.php:186
#7 /home/krll/projects/test/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php:327
#8 /home/krll/projects/test/tests/acceptance/AcceptanceTester.php:128
#9 /home/krll/projects/test/tests/acceptance/testCept.php:4
FAILURES!
Tests: 1, Assertions: 0, Errors: 1.
$server['HTTP_HOST'] = $this->extractHost($uri);
$server['HTTPS'] = 'https' == parse_url($uri, PHP_URL_SCHEME);
$this->internalRequest = new Request($uri, $method, $parameters, $files, $this->cookieJar->allValues($uri), $server, $content);
$this->request = $this->filterRequest($this->internalRequest);
if (true === $changeHistory) {
$this->history->add($this->internalRequest);
}
if ($this->insulated) {
$this->response = $this->doRequestInProcess($this->request);
} else {
$this->response = $this->doRequest($this->request);
}
$this->internalResponse = $this->filterResponse($this->response);
$this->cookieJar->updateFromResponse($this->internalResponse, $uri);
$status = $this->internalResponse->getStatus();
if ($status >= 300 && $status < 400) {
$this->redirect = $this->internalResponse->getHeader('Location');
} else {
$this->redirect = null;
}
Answer the question
In order to leave comments, you need to log in
1. curl -V
2. Installation from sources:
wget http://curl.haxx.se/download/curl-7.37.1.tar.gz
tar xzfv curl-7.37.1.tar.gz
cd curl-7.37.1/
# Документация по установке
less docs/INSTALL
# Список всех доступных опций
./configure --help
# Нужные вам параметры компиляции
./configure --help | egrep "OpenSSL|zlib" | grep -v without
# Нужное вам
./configure --with-zlib --with-ssl
configure: Configured to build curl/libcurl:
curl version: 7.37.1
Host setup: x86_64-unknown-linux-gnu
Install prefix: /usr/local
Compiler: gcc
SSL support: enabled (OpenSSL)
zlib support: enabled
make
# Сборщик пакетов (придется установить пакет checkinstall
# Не пользуйтесь make install, это усложняет администрирование системы и засоряет ее.
checkinstall
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question