Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable load package after install #5030

Closed
englianhu opened this issue May 29, 2021 · 11 comments
Closed

Unable load package after install #5030

englianhu opened this issue May 29, 2021 · 11 comments
Labels

Comments

@englianhu
Copy link

# Minimal reproducible example

+> install.packages('data.table')
Installing package into '/usr/lib/R/library'
(as 'lib' is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/data.table_1.14.0.tar.gz'
Content type 'application/x-gzip' length 5303849 bytes (5.1 MB)
==================================================
downloaded 5.1 MB

* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** using staged installation
gcc -std=gnu99 8.4.0
zlib 1.2.11 is available ok
R CMD SHLIB supports OpenMP without any extra hint
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c assign.c -o assign.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c between.c -o between.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c bmerge.c -o bmerge.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c chmatch.c -o chmatch.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c cj.c -o cj.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c coalesce.c -o coalesce.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c dogroups.c -o dogroups.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fastmean.c -o fastmean.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fcast.c -o fcast.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fifelse.c -o fifelse.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fmelt.c -o fmelt.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c forder.c -o forder.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c frank.c -o frank.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fread.c -o fread.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c freadR.c -o freadR.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c froll.c -o froll.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c frollR.c -o frollR.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c frolladaptive.c -o frolladaptive.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fsort.c -o fsort.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fwrite.c -o fwrite.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c fwriteR.c -o fwriteR.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c gsumm.c -o gsumm.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c ijoin.c -o ijoin.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c -o init.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c inrange.c -o inrange.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c nafill.c -o nafill.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c nqrecreateindices.c -o nqrecreateindices.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c openmp-utils.c -o openmp-utils.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c quickselect.c -o quickselect.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c rbindlist.c -o rbindlist.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c reorder.c -o reorder.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c shift.c -o shift.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c snprintf.c -o snprintf.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c subset.c -o subset.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c transpose.c -o transpose.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c types.c -o types.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c uniqlist.c -o uniqlist.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c utils.c -o utils.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c vecseq.c -o vecseq.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG     -fopenmp  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-tbZjLv/r-base-4.1.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c wrappers.c -o wrappers.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o nafill.o nqrecreateindices.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -fopenmp -lz -L/usr/lib/R/lib -lR
PKG_CFLAGS = -fopenmp
PKG_LIBS = -fopenmp -lz
if [ "data.table.so" != "datatable.so" ]; then mv data.table.so datatable.so; fi
if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id datatable.so datatable.so; fi
installing to /usr/lib/R/library/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
-Error: package or namespace load failed for ‘data.table’ in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
-Error: package or namespace load failed for ‘data.table’ in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
-Error in namespaceExport(ns, exports) : undefined exports: class ITime
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> loadNamespace -> namespaceExport
** testing if installed package keeps a record of temporary installation path
* DONE (data.table)

The downloaded source packages are in
        '/tmp/Rtmp4mfg3B/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
✔ 
❯ require('data.table')
Loading required package: data.table
-Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
- undefined exports: class ITime

# Output of sessionInfo()

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS
@englianhu
Copy link
Author

englianhu commented May 29, 2021

useDynLib(datatable, .registration=TRUE)

## For S4-ization
import(methods)
exportClasses(data.table, IDate, ITime)
##

export(data.table, tables, setkey, setkeyv, key, "key<-", haskey, CJ, SJ, copy)
export(setindex, setindexv, indices)
export(as.data.table,is.data.table,test.data.table)
export(last,first,like,"%like%","%ilike%","%flike%",between,"%between%",inrange,"%inrange%")
export(timetaken)
export(truelength, setalloccol, alloc.col, ":=")
export(setattr, setnames, setcolorder, set, setDT, setDF)
export(setorder, setorderv)
export(setNumericRounding, getNumericRounding)
export(chmatch, "%chin%", chorder, chgroup)
export(rbindlist)
export(fifelse)
export(fcase)
export(fread)
export(fwrite)
export(foverlaps)
export(shift)
export(transpose)
export(tstrsplit)
export(frank)
export(frankv)
export(address)
export(.SD,.N,.I,.GRP,.NGRP,.BY,.EACHI)
export(rleid)
export(rleidv)
export(rowid)
export(rowidv)
export(uniqueN)
export(setDTthreads, getDTthreads)
# set operators
export(fintersect)
export(fsetdiff)
export(funion)
export(fsetequal)
S3method(all.equal, data.table)
export(shouldPrint)
export(fsort)  # experimental parallel sort for vector type double only, currently
# grouping sets
export(groupingsets)
export(cube)
export(rollup)
S3method(groupingsets, data.table)
S3method(cube, data.table)
S3method(rollup, data.table)
export(frollmean)
export(frollsum)
export(frollapply)
export(nafill)
export(setnafill)
export(.Last.updated)
export(fcoalesce)

S3method("[", data.table)
S3method("[<-", data.table)
# S3method("[[", data.table)
# S3method("[[<-", data.table)
S3method("$<-", data.table)
S3method(print, data.table)
S3method(as.data.table, data.table)
S3method(as.data.table, data.frame)
S3method(as.data.table, array)
S3method(as.data.table, matrix)
S3method(as.data.table, list)
S3method(as.data.table, integer)
S3method(as.data.table, numeric)
S3method(as.data.table, character)
S3method(as.data.table, logical)
S3method(as.data.table, factor)
S3method(as.data.table, ordered)
S3method(as.data.table, Date)
S3method(as.data.table, ITime)
S3method(as.data.table, table)
S3method(as.data.table, default)
S3method(as.data.frame, data.table)
S3method(as.list, data.table)
S3method(as.matrix, data.table)
if (getRversion() >= "4.0.0") {
  # this version number must be the same as in .onLoad
  # fix in R in Sep 2019 (#3948) makes c|rbind S3 dispatch work; see FAQ 2.24.
  # if we register these (new in v1.12.6) methods always though, the previous workaround no longer works in R<4.0.0. Hence only register in R>=4.0.0.
  S3method(cbind, data.table)
  S3method(rbind, data.table)
}
# else {
#  # and if we export but don't register in R < 4.0.0 we get this note:
#  # > Found the following apparent S3 methods exported but not registered:
#  # > cbind.data.table rbind.data.table
#  # in addition to errors in tests 324, 326, 414.1, 414.2, 442, 445, 451
#  export(cbind.data.table)
#  export(rbind.data.table)
#  # A revdep using rbind.data.frame() directly before (which data.table changed in base) should change to rbind() generic and that should work
#  # in all combinations of R before/after 4.0.0 and data.table before/after 1.12.6, so long as data.table is installed using the same major
#  # version of R (and that is checked in .onLoad with error if not).
# }
export(.rbind.data.table) # continue to export for now because it has been exported in the past so it may be depended on
S3method(dim, data.table)
S3method(dimnames, data.table)
S3method("dimnames<-", data.table)
S3method("names<-", data.table)
S3method(duplicated, data.table)
S3method(unique, data.table)
S3method(merge, data.table)
export(merge.data.table) #2618
S3method(subset, data.table)
S3method(transform, data.table)
S3method(within, data.table)
S3method(is.na, data.table)
S3method(format, data.table)
S3method(Ops, data.table)
S3method(anyDuplicated, data.table)
S3method(split, data.table)

export(dcast, melt)
S3method(dcast, data.table)
S3method(melt, data.table)

# exported for historical reasons -- if reshape2 is higher on search path,
# dcast(DT) will not dispatch since reshape2::dcast is not generic. So users
# and many packges on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
export(melt.data.table, dcast.data.table)

import(utils)
S3method(update, dev.pkg)
export(update.dev.pkg)
S3method(tail, data.table)
S3method(head, data.table)
import(stats)
S3method(na.omit, data.table)

S3method(as.data.table, xts)
if (getRversion() >= "3.6.0") {
  export(as.xts.data.table)          # fails in R-devel if not exported too, but I don't understand why
  S3method(xts::as.xts, data.table)  # delayed registration (new in R-devel)  -- shouldn't this also export as.xts.data.table for us?
} else {
  export(as.xts.data.table)          # this on some configuration happens to fail as.xts dispatch to dt method #3286
}

# IDateTime support:
export(as.IDate,as.ITime,IDateTime)
export(second,minute,hour,yday,wday,mday,week,isoweek,month,quarter,year)

S3method("[", ITime)
S3method("+", IDate)
S3method("-", IDate)
S3method(as.character, ITime)
S3method(as.data.frame, ITime)
S3method(as.Date, IDate)   # note that base::as.Date is masked by zoo::as.Date, #1500 #4777
S3method(as.IDate, Date)
S3method(as.IDate, POSIXct)
S3method(as.IDate, default)
S3method(as.IDate, numeric)
S3method(as.ITime, character)
S3method(as.ITime, default)
S3method(as.ITime, POSIXct)
S3method(as.ITime, numeric)
S3method(as.ITime, POSIXlt)
S3method(as.ITime, times)
S3method(as.list, IDate)
S3method(as.POSIXct, IDate)
S3method(as.POSIXct, ITime)
S3method(as.POSIXlt, ITime)
S3method(c, IDate)
S3method(c, ITime)
S3method(cut, IDate)
S3method(format, ITime)
S3method(IDateTime, default)
S3method(mean, IDate)
S3method(mean, ITime)
S3method(print, ITime)
S3method(rep, IDate)
S3method(rep, ITime)
S3method(round, IDate)
S3method(round, ITime)
S3method(trunc, ITime)
S3method(seq, IDate)
S3method(seq, ITime)
S3method(unique, IDate)
S3method(unique, ITime)
S3method('[<-', IDate)
S3method(edit, data.table)

copied the Namespace but wonder whats wrong, somebody take a look?

Reference:


source : 求助:如何选取一个月中最后五天的数据

@MichaelChirico
Copy link
Member

have you tried a clean install? remove data.table first, restart the computer & install again?

the error looks quite unexpected, we should eliminate first the possibility that your installation wound up in a bad state somehow

@englianhu
Copy link
Author

englianhu commented May 30, 2021

have you tried a clean install? remove data.table first, restart the computer & install again?

the error looks quite unexpected, we should eliminate first the possibility that your installation wound up in a bad state somehow

Ttried but same...

Option 1

+> install.packages('data.table')
...
...
...
+installing to /usr/lib/R/library/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
-Error: package or namespace load failed for ‘data.table’ in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
-Error: package or namespace load failed for ‘data.table’ in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
-Error in namespaceExport(ns, exports) : undefined exports: class ITime
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> loadNamespace -> namespaceExport
** testing if installed package keeps a record of temporary installation path
* DONE (data.table)

The downloaded source packages are in
        '/tmp/RtmpJ6txW1/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Loading required package: data.table
-Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
- undefined exports: class ITime
data.table 
     FALSE

Option 2

+>install.packages('data.table', dependencies = TRUE, INSTALL_opts = '--no-lock')
-id datatable.so datatable.so; fi
installing to /usr/lib/R/library/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
-Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
* DONE (data.table)

The downloaded source packages are in
        '/tmp/RtmpsvMQa1/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Option 3

+> library('data.table')
ℹ data.table not installed. Trying to install now
ℹ Installing data.table

Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
-Error: package or namespace load failed for 'data.table' in get(Info[i, 1], envir = env):
- lazy-load database '/usr/lib/R/library/data.table/R/data.table.rdb' is corrupt
!In addition: Warning message:
!In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

@jangorecki
Copy link
Member

Are you installing in R console or in an IDE, like RStudio? Could you try in R console? Also please put full output of sessionInfo().

@englianhu
Copy link
Author

Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
 undefined exports: class ITime
Error: loading failed
* DONE (data.table)

The downloaded source packages are in
        '/tmp/RtmpQFanBg/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

RStudio & R_console, same error~

> session_info()$platform
 setting  value                       
 version  R version 4.1.0 (2021-05-18)
 os       Ubuntu 20.04.2 LTS          
 system   x86_64, linux-gnu           
 ui       X11                         
 language en                          
 collate  en_US.UTF-8                 
 ctype    C                           
 tz       Asia/Tokyo                  
 date     2021-06-0

@englianhu
Copy link
Author

englianhu commented May 31, 2021

simple and working smoothly on RStudio.Cloud

but

RStudio IDE and R console long story and doesn't work... will setup own computer as a RStudio Server

2021-06-01_08-02

Psiphon3 is not working smoothly in Linux (Win OS will be able to adjust the tunnel ip), not familiar with K-Phon thispc/psiphon#38

RStudio.Cloud working smoothly but limited 3GB workspace for every single project and cannot install other packages without sudo, https://community.rstudio.com temporary holded

@MichaelChirico
Copy link
Member

Sorry @englianhu I've still no idea what's going wrong.

One more thing to try -- can you run install.packages() and then share the output of running the following:

install.packages('data.table')
f <- list.files(file.path(tempdir(), "downloaded_packages"), full.names=TRUE)
untar(f, exdir = tempdir())
writeLines(readLines(file.path(tempdir(), "data.table", "NAMESPACE")))

@englianhu
Copy link
Author

Sorry @englianhu I've still no idea what's going wrong.

One more thing to try -- can you run install.packages() and then share the output of running the following:

install.packages('data.table')
f <- list.files(file.path(tempdir(), "downloaded_packages"), full.names=TRUE)
untar(f, exdir = tempdir())
writeLines(readLines(file.path(tempdir(), "data.table", "NAMESPACE")))

ran above code and try library() to call but doesn't work

library('data.table')
ℹ data.table not installed. Trying to install nowInstalling data.table
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
 undefined exports: class ITime

@englianhu
Copy link
Author

download the data.table package via RStudio and 🔨Install & Restart,

2021-06-04_17-00

and move the package to library folder

:~$ sudo apt-get install rsync -y
:~$ rsync -a source/ target/

enter to R and read the package from library.

:~$ R

R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

The following objects are masked from package:base:

    !, print.function


x wifi | v ethernet
#rsessions: 2
[Previously saved workspace restored]

v 
> library(data.table)
data.table 1.14.1 IN DEVELOPMENT built 2021-06-04 07:59:53 UTC using 2 threads (see ?getDTthreads).  Latest news: r-datatable.com

Attaching package: 'data.table'

The following objects are masked from 'package:lubridate':

    hour, isoweek, mday, minute, month, quarter, second, wday, week, yday, year

The following objects are masked from 'package:dplyr':

    between, first, last

The following object is masked from 'package:purrr':

    transpose

@jangorecki
Copy link
Member

jangorecki commented Jun 4, 2021

@englianhu from your last comment it doesn't seem that the issue has been fix but you just found a workaround. Could you please run the following code and provide complete console output.

sessionInfo()
install.packages("data.table")

Please do not use RStudio, RStudio server or other IDE, use R console directly.

@englianhu
Copy link
Author

🇨🇳: 参照 aoles/EBImage#56 (comment) 即可安装成功。
🇬🇧: Installed by refer to aoles/EBImage#56 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants