Installing R package: Fixing package ‘xxx’ is not available (for R version x.y.z)” warning?

By Haktan Suren
Dec 6th, 2015
43 Comments
33175 Views

The default version of `install.packages` somehow stopped working for me on latest version of R. In fact this is regardless of the version of R. I remember having same problem with the older versions of R as well.

Here is the screen shot of the warning. if you are having similar problem, keep on reading.

Package is not available

Anyways, long story short, as everyone knows, if you want to install a package on R, you use:

install.packages('package-name')

And it asks you to pick a mirror repository to search the package in. If you are like me, picking the Cloud, you will soon realize, it will give you a misleading warning that the package is not available for your installed version of R. Well, this is not entirely true based on my experience.

I think not all the repositories include same packages (or versions) for some reason, that’s something I need to confirm it with R support team. If you select different mirror from previous step, and you are lucky enough, you might be able to install the package without any further problem/headache.

I usually use the following code to install package from R and it works 99% of the time.

install.packages('package-name',repos='http://cran.us.r-project.org')

There are several mirrors available you can try, simply change the repos field on the code above. Find the list of the mirrors here.

You still have problem installing the R package? See my other post here.

Feel free to share your experience, or the mirror works for you the best commenting below.

About the Author

Haktan Suren
- Webguru, Programmer, Web developer, and Father :)

43 Responses to “Installing R package: Fixing package ‘xxx’ is not available (for R version x.y.z)” warning?”

  1. […] of all, I highly recommend checking my other post if you are getting package ‘xxx’ is not available (for R version x.y.z)” […]

  2. leeza says:

    I am not being able to install plotly package,tried every method u given….what should i do to make it work.

  3. Michael says:

    This was very helpful, thank you!

  4. SP says:

    I tried install.packages(‘package-name’,repos=’http://cran.us.r-project.org’) but it didnt work, now I have a new warning Installing package into ‘/home/MYSELF/R/x86_64-pc-linux-gnu-library/3.2’
    (as ‘lib’ is unspecified)
    what does it mean the lib is unspecified

  5. Kunal says:

    THanks a lot

  6. Mahnoor Akmal says:

    I am also having problem in installing worldcloud and sentiment package in R. it gives an error.
    Warning in install.packages :
    package ‘worldcloud’ is not available (for R version 3.4.4)
    Warning in install.packages :
    package ‘sentiment’ is not available (for R version 3.4.4)
    what can I do in this regard?

  7. Mahnoor Akmal says:

    By trying this
    install.packages(‘package-name’,repos=’http://cran.us.r-project.org’)

    It gives me this error

    Warning in install.packages :
    unable to access index for repository http://cran.us.r-project.org/src/contrib:
    cannot open URL ‘http://cran.us.r-project.org/src/contrib/PACKAGES’
    Warning in install.packages :
    package ‘worldcloud’ is not available (for R version 3.4.4)
    Warning in install.packages :
    unable to access index for repository http://cran.us.r-project.org/bin/windows/contrib/3.4:
    cannot open URL ‘http://cran.us.r-project.org/bin/windows/contrib/3.4/PACKAGES’

  8. Caglayan says:

    Hi,

    I am having some kind of problem in R. I tried to install “varest” package however it looks unavaliable. Pls could you help me about this issue.

    Here is the problem that I have.

    > install.packages(‘varest’)
    Installing package into ‘C:/Users/user/Documents/R/win-library/3.5’
    (as ‘lib’ is unspecified)
    Warning in install.packages :
    package ‘varest’ is not available (for R version 3.5.1)

  9. Çağlayan says:

    Problem is solved. Thank you. I am really apricated.

  10. Shim says:

    package ‘deal’ is not available (for R version 3.5.1)

  11. Shim says:

    Hi, Suren!
    I’m studying “Bayesian Network Credit Scoring in R”!
    The code presented in related document uses libray “deal”.
    When I installed package for deal, the following error occured!
    Please help me!!!
    =========================================
    install.packages(‘deal’,repos=’http://cran.us.r-project.org’)
    Installing package into ‘C:/Users/admin/Documents/R/win-library/3.5’
    (as ‘lib’ is unspecified)
    Warning in install.packages :
    package ‘deal’ is not available (for R version 3.5.1)

  12. Suyav Saifi says:

    I tried to install the package lubridate. it show me below mentioned error
    > install.packages(“lubridate”)
    Warning in install.packages :
    unable to access index for repository https://cran.rstudio.com/src/contrib:
    cannot open URL ‘https://cran.rstudio.com/src/contrib/PACKAGES’
    Installing package into ‘C:/Users/DELL/Documents/R/win-library/3.4’
    (as ‘lib’ is unspecified)
    Warning in install.packages :
    unable to access index for repository https://cran.rstudio.com/src/contrib:
    cannot open URL ‘https://cran.rstudio.com/src/contrib/PACKAGES’
    Warning in install.packages :
    package ‘lubridate’ is not available (for R version 3.4.3)
    Warning in install.packages :
    unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/3.4:
    cannot open URL ‘https://cran.rstudio.com/bin/windows/contrib/3.4/PACKAGES’

  13. bala says:

    Hi Team,

    I am getting the error while installing forecast package as mention below.

    > install.packages(‘forecast’,repos=’http://cran.us.r-project.org’)
    Warning: unable to access index for repository http://cran.us.r-project.org/src/contrib:
    cannot open URL ‘http://cran.us.r-project.org/src/contrib/PACKAGES’
    Warning: unable to access index for repository http://cran.us.r-project.org/bin/windows/contrib/3.4:
    cannot open URL ‘http://cran.us.r-project.org/bin/windows/contrib/3.4/PACKAGES’
    Warning message:
    package ‘forecast’ is not available (for R version 3.4.1) .

  14. Deborah says:

    Hi Suren,
    I am having some kind of problems in R.
    I tried to install “GeneR” package however it looks unavaliable.Could you help me about this issue? I also try the above methods,but it can’t solve my problems.
    Here is the problem that I have.

    > install.packages(“GeneR”,repos=”http://cran.us.r-project.org”)
    Installing package into ‘/home/xinw/R/x86_64-pc-linux-gnu-library/3.5’
    (as ‘lib’ is unspecified)
    Warning in install.packages :
    package ‘GeneR’ is not available (for R version 3.5.1)

    I have taken one day to solve this problem,so I look forward to you reply.
    Thank you very much!

    • Haktan Suren Haktan Suren says:

      It is because GeneR is on Bioconductor.

      Try this:

      source(“http://bioconductor.org/biocLite.R”)
      biocLite(“GeneR”)
      #and after succesfull install
      library(GeneR)

      • Deborah says:

        It has some other problems.

        > source(‘http://bioconductor.org/biocLite.R’)
        Bioconductor version 3.7 (BiocInstaller 1.30.0), ?biocLite for help
        > biocLite(‘GeneR’)
        BioC_mirror: https://bioconductor.org
        Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.1 (2018-07-02).
        Installing package(s) ‘GeneR’
        installation path not writeable, unable to update packages: MASS
        Warning message:
        package ‘GeneR’ is not available (for R version 3.5.1)

  15. Deborah says:

    I change the access to ‘.libPaths()’:
    # chmod a+w /usr/local/lib/R/site-library
    # chmod a+w /usr/lib/R/site-library
    # chmod a+w /usr/lib/R/library
    > biocLite(‘GeneR’)
    BioC_mirror: https://bioconductor.org
    Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.1 (2018-07-02).
    Installing package(s) ‘GeneR’
    Old packages: ‘MASS’
    Update all/some/none? [a/s/n]:
    a
    trying URL ‘https://cloud.r-project.org/src/contrib/MASS_7.3-51.tar.gz’
    Content type ‘application/x-gzip’ length 487219 bytes (475 KB)
    ==================================================
    downloaded 475 KB

    * installing *source* package ‘MASS’ …
    ** package ‘MASS’ successfully unpacked and MD5 sums checked
    mv: cannot move ‘/usr/lib/R/library/MASS’ to ‘/usr/lib/R/library/00LOCK-MASS/MASS’: Permission denied
    Warning in file.copy(f, instdir, TRUE) :
    problem copying ./NAMESPACE to /usr/lib/R/library/MASS/NAMESPACE: Permission denied
    Warning in file(file, if (append) “a” else “w”) :
    cannot open file ‘/usr/lib/R/library/MASS/DESCRIPTION’: Permission denied
    Error in file(file, if (append) “a” else “w”) :
    cannot open the connection
    ERROR: installing package DESCRIPTION failed for package ‘MASS’
    * removing ‘/usr/lib/R/library/MASS’

    The downloaded source packages are in
    ‘/tmp/RtmpL6NtAU/downloaded_packages’
    Updating HTML index of packages in ‘.Library’
    Warning messages:
    1: package ‘GeneR’ is not available (for R version 3.5.1)
    2: In install.packages(update[instlib == l, “Package”], l, contriburl = contriburl, :
    installation of package ‘MASS’ had non-zero exit status
    3: In file.create(f.tg) :
    cannot create file ‘/usr/share/R/doc/html/packages.html’, reason ‘Permission denied’
    4: In make.packages.html(.Library) : cannot update HTML package index

    There are more problems,I am a R beginner.
    I don‘t konw how to do that.I look forward to you reply.
    Thank you very much.

    • Haktan Suren Haktan Suren says:

      Seems like it is still user write problem for the given directory.

      If you are using R in command line, can you try running it with sudo?

      sudo R –vanilla

      and then install the packages…

      Let me know how it goes.

      • Deborah says:

        > biocLite(“GeneR”)
        BioC_mirror: https://bioconductor.org
        Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.1 (2018-07-02).
        Installing package(s) ‘GeneR’
        Old packages: ‘MASS’
        Update all/some/none? [a/s/n]:
        n
        Warning message:
        package ‘GeneR’ is not available (for R version 3.5.1)

          • Deborah says:

            I’d try running R with sudo.

            ~$ sudo R -vanilla
            > source(“http://bioconductor.org/biocLite.R”)
            Bioconductor version 3.7 (BiocInstaller 1.30.0), ?biocLite for help
            > biocLite(“GeneR”)
            BioC_mirror: https://bioconductor.org
            Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.1 (2018-07-02).
            Installing package(s) ‘GeneR’
            Old packages: ‘MASS’
            Update all/some/none? [a/s/n]: a
            trying URL ‘https://cloud.r-project.org/src/contrib/MASS_7.3-51.tar.gz’
            Content type ‘application/x-gzip’ length 487219 bytes (475 KB)
            ==================================================
            downloaded 475 KB

            * installing *source* package ‘MASS’ …
            ** package ‘MASS’ successfully unpacked and MD5 sums checked
            ** libs
            gcc -std=gnu99 -I”/usr/share/R/include” -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-oNcpyf/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c MASS.c -o MASS.o
            gcc -std=gnu99 -I”/usr/share/R/include” -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-oNcpyf/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c lqs.c -o lqs.o
            gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o MASS.so MASS.o lqs.o -L/usr/lib/R/lib -lR
            installing to /usr/lib/R/library/MASS/libs
            ** R
            ** data
            *** moving datasets to lazyload DB
            ** inst
            ** byte-compile and prepare package for lazy loading
            ** help
            *** installing help indices
            ** building package indices
            ** testing if installed package can be loaded
            * DONE (MASS)

            The downloaded source packages are in
            ‘/tmp/RtmpIdmoWh/downloaded_packages’
            Updating HTML index of packages in ‘.Library’
            Making ‘packages.html’ … done
            Warning message:
            package ‘GeneR’ is not available (for R version 3.5.1)

            But there is the same problem.How could I do?
            Look forward your reply.Thank you very much.

          • Haktan Suren Haktan Suren says:

            did you try installing the package from source?

            Go here and download tar.gz file https://bioc.ism.ac.jp/packages/2.8/bioc/html/GeneR.html
            And then in the terminal run
            `R CMD INSTALL GeneR_2.22.0.tar.gz`

            it should work

          • Deborah says:

            Thanks for your reply.
            I install the package from source and run the command in the terminal.
            But I think my OS is Ubuntu,it can’t work.
            :~/R/x86_64-pc-linux-gnu-library/3.5$ R cmd install GeneR_2.22.0.tar.gz
            ARGUMENT ‘cmd’ __ignored__

            ARGUMENT ‘install’ __ignored__

            ARGUMENT ‘GeneR_2.22.0.tar.gz’ __ignored__

            And the information of R is:
            R version 3.5.1 (2018-07-02) — “Feather Spray”
            Copyright (C) 2018 The R Foundation for Statistical Computing
            Platform: x86_64-pc-linux-gnu (64-bit).

            And the IDE of R is R-studio.

            So is it the problem of my OS?
            Look forward to your reply,thanks a lot!

          • Haktan Suren Haktan Suren says:

            Please copy from my code, the command should be all upper case.

          • Deborah says:

            :~/R/x86_64-pc-linux-gnu-library/3.5$ R CMD INSTALL GeneR_2.22.0.tar.gz
            * installing to library ‘/home/R/x86_64-pc-linux-gnu-library/3.5’
            * installing *source* package ‘GeneR’ …
            ** libs
            g++ -I”/usr/share/R/include” -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-oNcpyf/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c GeneR_glob.cc -o GeneR_glob.o
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h: In member function ‘void GeneR_seq::setAccN(char*)’:
            GeneR_seq.h:156:15: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream’ and ‘std::ostream {aka std::basic_ostream}’)
            std::cout << "GeneR::GeneR_seq::setAccN Ouch name "<<_id<<
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            "too long" << std::cout;
            ~~~~~~~~~~~^~~~~~
            GeneR_seq.h:156:15: note: candidate: operator<<(int, int)
            GeneR_seq.h:156:15: note: no known conversion for argument 2 from ‘std::ostream {aka std::basic_ostream}’ to ‘int’
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:108:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(std::basic_ostream::__ostream_type& (*)(std::basic_ostream::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(__ostream_type& (*__pf)(__ostream_type&))
            ^~~~~~~~
            /usr/include/c++/7/ostream:108:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘std::basic_ostream::__ostream_type& (*)(std::basic_ostream::__ostream_type&) {aka std::basic_ostream& (*)(std::basic_ostream&)}’
            /usr/include/c++/7/ostream:117:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(std::basic_ostream::__ios_type& (*)(std::basic_ostream::__ios_type&)) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream; std::basic_ostream::__ios_type = std::basic_ios]
            operator<<(__ios_type& (*__pf)(__ios_type&))
            ^~~~~~~~
            /usr/include/c++/7/ostream:117:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘std::basic_ostream::__ios_type& (*)(std::basic_ostream::__ios_type&) {aka std::basic_ios& (*)(std::basic_ios&)}’
            /usr/include/c++/7/ostream:127:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(ios_base& (*__pf) (ios_base&))
            ^~~~~~~~
            /usr/include/c++/7/ostream:127:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘std::ios_base& (*)(std::ios_base&)’
            /usr/include/c++/7/ostream:166:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(long int) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(long __n)
            ^~~~~~~~
            /usr/include/c++/7/ostream:166:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘long int’
            /usr/include/c++/7/ostream:170:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(unsigned long __n)
            ^~~~~~~~
            /usr/include/c++/7/ostream:170:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘long unsigned int’
            /usr/include/c++/7/ostream:174:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(bool) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(bool __n)
            ^~~~~~~~
            /usr/include/c++/7/ostream:174:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘bool’
            In file included from /usr/include/c++/7/ostream:693:0,
            from /usr/include/c++/7/iostream:39,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/bits/ostream.tcc:91:5: note: candidate: std::basic_ostream& std::basic_ostream::operator<<(short int) [with _CharT = char; _Traits = std::char_traits]
            basic_ostream::
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            /usr/include/c++/7/bits/ostream.tcc:91:5: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘short int’
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:181:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(short unsigned int) [with_CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(unsigned short __n)
            ^~~~~~~~
            /usr/include/c++/7/ostream:181:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘short unsigned int’
            In file included from /usr/include/c++/7/ostream:693:0,
            from /usr/include/c++/7/iostream:39,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/bits/ostream.tcc:105:5: note: candidate: std::basic_ostream& std::basic_ostream::operator<<(int) [with _CharT = char; _Traits = std::char_traits]
            basic_ostream::
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            /usr/include/c++/7/bits/ostream.tcc:105:5: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘int’
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:192:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(unsigned int __n)
            ^~~~~~~~
            /usr/include/c++/7/ostream:192:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘unsigned int’
            /usr/include/c++/7/ostream:201:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(long long __n)
            ^~~~~~~~
            /usr/include/c++/7/ostream:201:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘long long int’
            /usr/include/c++/7/ostream:205:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(unsigned long long __n)
            ^~~~~~~~
            /usr/include/c++/7/ostream:205:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘long long unsigned int’
            /usr/include/c++/7/ostream:220:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(double) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(double __f)
            ^~~~~~~~
            /usr/include/c++/7/ostream:220:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘double’
            /usr/include/c++/7/ostream:224:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(float) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(float __f)
            ^~~~~~~~
            /usr/include/c++/7/ostream:224:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘float’
            /usr/include/c++/7/ostream:232:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(long double) [with _CharT= char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(long double __f)
            ^~~~~~~~
            /usr/include/c++/7/ostream:232:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘long double’
            /usr/include/c++/7/ostream:245:7: note: candidate: std::basic_ostream::__ostream_type& std::basic_ostream::operator<<(const void*) [with _CharT= char; _Traits = std::char_traits; std::basic_ostream::__ostream_type = std::basic_ostream]
            operator<<(const void* __p)
            ^~~~~~~~
            /usr/include/c++/7/ostream:245:7: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘const void*’
            In file included from /usr/include/c++/7/ostream:693:0,
            from /usr/include/c++/7/iostream:39,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/bits/ostream.tcc:119:5: note: candidate: std::basic_ostream& std::basic_ostream::operator<<(std::basic_ostream::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream::__streambuf_type = std::basic_streambuf]
            basic_ostream::
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            /usr/include/c++/7/bits/ostream.tcc:119:5: note: no known conversion for argument 1 from ‘std::ostream {aka std::basic_ostream}’ to ‘std::basic_ostream::__streambuf_type* {aka std::basic_streambuf*}’
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:682:5: note: candidate: template typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference >, std::__is_convertible_to_basic_ostream, std::__is_insertable<typename std::__is_convertible_to_basic_ostream::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)
            operator<<(_Ostream&& __os, const _Tp& __x)
            ^~~~~~~~
            /usr/include/c++/7/ostream:682:5: note: template argument deduction/substitution failed:
            /usr/include/c++/7/ostream: In substitution of ‘template typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference >, std::__is_convertible_to_basic_ostream, std::__is_insertable<typename std::__is_convertible_to_basic_ostream::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream&; _Tp = std::basic_ostream]’:
            GeneR_seq.h:156:23: required from here
            /usr/include/c++/7/ostream:682:5: error: no type named ‘type’ in ‘struct std::enable_if<false, std::basic_ostream&>’
            /usr/include/c++/7/ostream:574:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, const unsigned char*)
            operator<<(basic_ostream& __out, const unsigned char* __s)
            ^~~~~~~~
            /usr/include/c++/7/ostream:574:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘const unsigned char*’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:569:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, const signed char*)
            operator<<(basic_ostream& __out, const signed char* __s)
            ^~~~~~~~
            /usr/include/c++/7/ostream:569:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘const signed char*’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:556:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, const char*)
            operator<<(basic_ostream& __out, const char* __s)
            ^~~~~~~~
            /usr/include/c++/7/ostream:556:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘const char*’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/ostream:693:0,
            from /usr/include/c++/7/iostream:39,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/bits/ostream.tcc:321:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, const char*)
            operator<<(basic_ostream& __out, const char* __s)
            ^~~~~~~~
            /usr/include/c++/7/bits/ostream.tcc:321:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘const char*’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:539:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, const _CharT*)
            operator<<(basic_ostream& __out, const _CharT* __s)
            ^~~~~~~~
            /usr/include/c++/7/ostream:539:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: mismatched types ‘const _CharT*’ and ‘std::basic_ostream’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:519:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, unsigned char)
            operator<<(basic_ostream& __out, unsigned char __c)
            ^~~~~~~~
            /usr/include/c++/7/ostream:519:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘unsigned char’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:514:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, signed char)
            operator<<(basic_ostream& __out, signed char __c)
            ^~~~~~~~
            /usr/include/c++/7/ostream:514:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘signed char’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:508:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, char)
            operator<<(basic_ostream& __out, char __c)
            ^~~~~~~~
            /usr/include/c++/7/ostream:508:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘char’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:502:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, char)
            operator<<(basic_ostream& __out, char __c)
            ^~~~~~~~
            /usr/include/c++/7/ostream:502:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘char’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/iostream:39:0,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/ostream:497:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, _CharT)
            operator<<(basic_ostream& __out, _CharT __c)
            ^~~~~~~~
            /usr/include/c++/7/ostream:497:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘std::basic_ostream’)
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/bits/ios_base.h:46:0,
            from /usr/include/c++/7/ios:42,
            from /usr/include/c++/7/ostream:38,
            from /usr/include/c++/7/iostream:39,
            from GeneR_seq.h:18,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/system_error:217:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, const std::error_code&)
            operator<<(basic_ostream& __os, const error_code& __e)
            ^~~~~~~~
            /usr/include/c++/7/system_error:217:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: cannot convert ‘std::cout’ (type ‘std::ostream {aka std::basic_ostream}’) to type ‘const std::error_code&’
            “too long” << std::cout;
            ^~~~
            In file included from /usr/include/c++/7/string:52:0,
            from GeneR_seq.h:15,
            from GeneR_glob.cc:13:
            /usr/include/c++/7/bits/basic_string.h:6275:5: note: candidate: template std::basic_ostream& std::operator<<(std::basic_ostream&, const std::__cxx11::basic_string&)
            operator<<(basic_ostream& __os,
            ^~~~~~~~
            /usr/include/c++/7/bits/basic_string.h:6275:5: note: template argument deduction/substitution failed:
            In file included from GeneR_glob.cc:13:0:
            GeneR_seq.h:156:23: note: ‘std::ostream {aka std::basic_ostream}’ is not derived from ‘const std::__cxx11::basic_string’
            “too long” << std::cout;
            ^~~~
            /usr/lib/R/etc/Makeconf:166: recipe for target 'GeneR_glob.o' failed
            make: *** [GeneR_glob.o] Error 1
            ERROR: compilation failed for package ‘GeneR’
            * removing ‘/home/R/x86_64-pc-linux-gnu-library/3.5/GeneR’

            Mr Haktan Suren,there is the new problem.
            Should i try to reinstall R ?
            Because it still have the problem,I don't know how to do,i lost my confidence.
            Thank you very much for your patience.
            Look forward to your reply again!

          • Haktan Suren Haktan Suren says:

            No I do not think R reinstall would fix this. You are getting a compilation error. Btw, May I ask why you want to use GeneR package? Maybe you can find some other alternative?

          • Deborah says:

            Thanks for your reply.
            I am a beginner of the R language.
            Currently I want to process a .fa file and need to use the readFasta() function.
            I mainly use R for the analysis of biological information data.
            I consulted R’s book and said that there are two ways to install R. An installation release, a compilation and installation from scratch. And it is recommended to use the release version for installation. I am thinking about whether I am compiling and installing from scratch, so it will be more troublesome in the subsequent work.
            I install other packages also have some problems.And it wasted me a lot time.
            So I am thinking about reinstalling R.

          • Haktan Suren Haktan Suren says:

            Then go ahead and reinstall the R. And try to install any package.

  16. Deborah says:

    Thank you for your reply.
    I install the package of ‘GeneR’ successfully.
    I download the ‘GeneR’ package from ‘https://www.bioconductor.org/help/search/index.html?q=GeneR/’
    Then I install from Package Archive File(.tar.gz):
    ~$ tar -xzf /R/x86_64-pc-linux-gnu-library/3.5/GeneR_1.4.2.tar.gz
    ~$ cd /home/xinw/R/x86_64-pc-linux-gnu-library/3.5/GeneR
    ~/R/x86_64-pc-linux-gnu-library/3.5/GeneR$ echo ‘exportPattern( “.” )’ > NAMESPACE
    ~/R/x86_64-pc-linux-gnu-library/3.5/GeneR$ cd ..
    ~/R/x86_64-pc-linux-gnu-library/3.5$ tar -zcf GeneR_1.4.2.tar.gz GeneR
    ~/R/x86_64-pc-linux-gnu-library/3.5$ R CMD INSTALL GeneR_1.4.2.tar.gz
    ……
    * DONE (GeneR)
    > library(“GeneR”, lib.loc=”~/R/x86_64-pc-linux-gnu-library/3.5″)
    > readFasta(“chrY.fa”)
    Error in .C(“sys_free”, as.integer(seqno), PACKAGE = “GeneR”) :
    “sys_free” not available for .C() for package “GeneR”
    But there is the new problem.

  17. Srilatha says:

    Hi,

    I tried to install ggrepe1 using – install.packages(‘ggrepe1′,repos=’http://cran.us.r-project.org’)
    it’s showing me this error – package ‘ggrepe1’ is not available (for R version 3.5.1)

    I also tried to update my R, but it says that i’m using the latest version of R. How can i install the package now ?
    Thanks in Advance.

Wrap your code in <code class="{language}"></code> tags to embed!

Leave a Reply

E-mail address is required for commenting. However, it won't be visible to other users.

Loading Facebook Comments ...
Loading Disqus Comments ...