Curl 安装过程中出错 - 详细步骤如下

Posted

技术标签:

【中文标题】Curl 安装过程中出错 - 详细步骤如下【英文标题】:Error during Curl installation - Detailed steps below 【发布时间】:2016-07-18 14:49:03 【问题描述】:

以下是我尝试在 solaris 9 机器上安装 curl 的步骤

我遵循的步骤:

1.take the new tar file.
2.untar it(tar -xvf curl-7.15.0.tar)
3.go to the curl location (cd /home/NYIMSDEV/Curl)
4.run the configuration commands
5.CPPFLAGS="-I/db/pub/infra/DBssl/current/include" LDFLAGS="-R/db/pub/infra/DBssl/current/lib" CC=/db/pub/infra/SUNWspro/current/SUNWspro/bin/CC ./configure --with-ssl=/db/pub/infra/DBssl/current --prefix=/home/NYIMSDEV/Curl 
6. i faced error "ar" file not found in path.
7.added ar path in PATH.(PATH=$PATH:/usr/ccs/bin)
8.another issue faced is .it was not supporting HTTPS protocall.so find the location of openssl and added in command as added in above command (--with-ssl==/db/pub/infra/DBssl/current)
9.after configuration run the make command.

但是由于下面的错误导致 make 失败,我无法理解

bash-2.03$ make
Making all in lib
make  all-am
source='base64.c' object='base64.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --tag=CC --mode=compile /db/pub/infra/SUNWspro/current/SUNWspro/bin/CC -DHAVE_CONFIG_H   -I../include -I../lib -I../lib  -I/db/pub/infra/DBssl/current/include -I/db/pub/infra/DBssl/current/include/openssl -I/db/pub/infra/DBssl/current/include   -g -c -o base64.lo base64.c
/db/pub/infra/SUNWspro/current/SUNWspro/bin/CC -DHAVE_CONFIG_H -I../include -I../lib -I../lib -I/db/pub/infra/DBssl/current/include -I/db/pub/infra/DBssl/current/include/openssl -I/db/pub/infra/DBssl/current/include -g -c base64.c  -KPIC -DPIC -o .libs/base64.o
"base64.c", line 112: Error: Cannot assign void* to unsigned char*.
"base64.c", line 113: Warning: The variable newstr has not yet been assigned a value.
1 Error(s) and 1 Warning(s) detected.
*** Error code 1
make: Fatal error: Command failed for target `base64.lo'
Current working directory /home/NYIMSDEV/Module/curl-7.15.0/lib
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /home/NYIMSDEV/Module/curl-7.15.0/lib
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

对错误或导致错误的原因的任何见解都会有很大帮助

【问题讨论】:

【参考方案1】:

您正在尝试使用 C++ 编译器来编译 C。

In C++, you can not assign void * to a non-void * pointer without a proper type cast.

这是不正确的:

CC=/db/pub/infra/SUNWspro/current/SUNWspro/bin/CC

CC(大写)用于 Solaris Studio C++ 编译器。你想要的

CC=/db/pub/infra/SUNWspro/current/SUNWspro/bin/cc

(小写cc)获取C编译器。

【讨论】:

以上是关于Curl 安装过程中出错 - 详细步骤如下的主要内容,如果未能解决你的问题,请参考以下文章

microsoft office Enterprise 2007在安装过程中出错怎么办?

office2007安装过程中出错怎么解决

sqlsever2012安装失败

安装CURL

[转帖]JProfiler远程监控Linux上Tomcat的安装过程细讲(步骤非常详细!!!)

安装istio v1.0 详细过程和步骤