3

I want to install odbc R package but installation failed. Apparently, I miss codecvt, but I don't know wat it is and how to get it. Somebody can help me? Thanks

I obtained the following messages :

** package 'odbc' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs
(cd cctz && \
/Rtools/bin/make libcctz.a PREFIX="../" CC="C:/Rtools/mingw_64/bin/gcc " CXX="C:/Rtools/mingw_64/bin/g++  -std=gnu++11" AR="C:/Rtools/mingw_64/bin/ar" ARFLAGS=rv)
make[1]: Entering directory '/Users/sgoix/AppData/Local/Temp/RtmpAn9yWH/R.INSTALL17141d281ad0/odbc/src/cctz'
C:/Rtools/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O  -MMD  -c -o time_zone_format.o src/time_zone_format.cc
C:/Rtools/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O  -MMD  -c -o time_zone_if.o src/time_zone_if.cc
C:/Rtools/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O  -MMD  -c -o time_zone_impl.o src/time_zone_impl.cc
C:/Rtools/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O  -MMD  -c -o time_zone_info.o src/time_zone_info.cc
C:/Rtools/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O  -MMD  -c -o time_zone_libc.o src/time_zone_libc.cc
C:/Rtools/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O  -MMD  -c -o time_zone_lookup.o src/time_zone_lookup.cc
C:/Rtools/mingw_64/bin/g++  -std=gnu++11  -Wall -Iinclude -std=c++11 -pthread  -O  -MMD  -c -o time_zone_posix.o src/time_zone_posix.cc
C:/Rtools/mingw_64/bin/ar rv libcctz.a time_zone_format.o time_zone_if.o time_zone_impl.o time_zone_info.o time_zone_libc.o time_zone_lookup.o time_zone_posix.o
a - time_zone_format.o
a - time_zone_if.o
a - time_zone_impl.o
a - time_zone_info.o
a - time_zone_libc.o
a - time_zone_lookup.o
a - time_zone_posix.o
C:\Rtools\mingw_64\bin\ar.exe: creating libcctz.a
make[1]: Leaving directory '/Users/sgoix/AppData/Local/Temp/RtmpAn9yWH/R.INSTALL17141d281ad0/odbc/src/cctz'
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"D:/R-Portable-3.6.2/App/R-Portable/include" -DNDEBUG  -I"D:/R-Portable-3.6.2/App/R-Portable/library/Rcpp/include"     -I. -Icctz/include -Inanodbc   -O2 -Wall  -mtune=generic -c odbc_result.cpp -o odbc_result.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"D:/R-Portable-3.6.2/App/R-Portable/include" -DNDEBUG  -I"D:/R-Portable-3.6.2/App/R-Portable/library/Rcpp/include"     -I. -Icctz/include -Inanodbc   -O2 -Wall  -mtune=generic -c connection.cpp -o connection.o
C:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"D:/R-Portable-3.6.2/App/R-Portable/include" -DNDEBUG  -I"D:/R-Portable-3.6.2/App/R-Portable/library/Rcpp/include"     -I. -Icctz/include -Inanodbc   -O2 -Wall  -mtune=generic -c nanodbc/nanodbc.cpp -o nanodbc.o
nanodbc/nanodbc.cpp:40:19: fatal error: codecvt: No such file or directory
 #include <codecvt>
                   ^
compilation terminated.
make: *** [Makevars.win:17: nanodbc.o] Error 1
ERROR: compilation failed for package 'odbc'
* removing 'D:/R-Portable-3.6.2/App/R-Portable/library/odbc'
Warning in install.packages :
  installation of package ‘odbc’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\sgoix\AppData\Local\Temp\RtmpaYbMeY\downloaded_packages’ ```

sylvaine31
  • 41
  • 3

2 Answers2

0

I finally found the solution by answering "No" to the question : "There is a binary available but source is later, do you want to install from source?"

sylvaine31
  • 41
  • 3
  • Depends on the version you are trying to install : for example, if you are trying to go from odbc v1.2.1 to 1.2.2, then answering "no" would help. However, the latest version version (1.2.3) is available in binary format, so if you areying to move to that vesrion, answering "No" will not help. – Boris N. Aug 03 '20 at 15:21
  • 1
    Where did you answer "No", I don't see it anywhere in your question – user1700890 Oct 27 '20 at 16:27
0

Try Lowering down the version of BH package to 1.78.0-0:

devtools::install_version("BH", "1.78.0-0")

Vishal Sharma
  • 289
  • 2
  • 10