I'm unable to install packages using renv::restore(). I was trying to install renv packages. Here're my steps I did:
-
Install renv package
install.packages( "https://cran.r-project.org/src/contrib/Archive/renv/renv_0.12.5.tar.gz", repos = NULL, type = "source" ) -
Initialize a local library
renv::init(bare=TRUE) -
Install the correct packages
renv::restore()
In the #3 process, I faced an error message as below;
Would you please check my error and help me solve the problem?
Installing curl [4.3] ...
FAILED
Error installing package 'curl':
- installing to library 'C:/Users/gkim01/AppData/Local/Temp/Rtmp0U8YEs/renv-staging-56d84ce724f'
- installing source package 'curl' ...
** package 'curl' successfully unpacked and MD5 sums checked
** using staged installation
** libs
rm -f curl.dll callbacks.o curl.o download.o escape.o fetch.o form.o getdate.o handle.o ieproxy.o init.o interrupt.o multi.o nslookup.o reflist.o split.o ssl.o typechecking.o utils.o version.o winidn.o writer.o libwinhttp.dll.a winhttp.def
"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/bin/x64/Rscript.exe" "../tools/winlibs.R" 7.64.1
echo '#include <curl/curl.h>' | gcc -E -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -std=gnu99 -xc - | grep "^[ \t]CURLOPT_.," | sed s/,// > ../tools/option_table.txt
cp winhttp64.def.in winhttp.def
dlltool --as as -k --dllname winhttp.dll --input-def winhttp.def --output-lib libwinhttp.dll.a
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c callbacks.c -o callbacks.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c curl.c -o curl.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c download.c -o download.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c escape.c -o escape.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c fetch.c -o fetch.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c form.c -o form.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c getdate.c -o getdate.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c handle.c -o handle.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c ieproxy.c -o ieproxy.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c interrupt.c -o interrupt.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c multi.c -o multi.o
gcc -I"C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -I../windows/libcurl-7.64.1/include -DCURL_STATICLIB -DSTRICT_R_HEADERS -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c nslookup.c -o nslookup.o
nslookup.c:17:13: error: conflicting types for 'inet_ntop'
17 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
| ^~~~~~~~~
In file included from nslookup.c:16:
c:\rtools42\x86_64-w64-mingw32.static.posix\include\ws2tcpip.h:401:35: note: previous declaration of 'inet_ntop' was here
401 | WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, LPCVOID pAddr, LPSTR pStringBuf, size_t StringBufSize);
| ^~~~~~~~~
make: *** [C:/Users/gkim01/AppData/Local/Programs/R/R-42~1.2/etc/x64/Makeconf:253: nslookup.o] Error 1
ERROR: compilation failed for package 'curl' - removing 'C:/Users/gkim01/AppData/Local/Temp/Rtmp0U8YEs/renv-staging-56d84ce724f/curl'
Error: install of package 'curl' failed
Thanks!!!