gpt4 book ai didi

r - 构建 R 包期间的警告消息 : invalid uid value replaced by that for user 'nobody'

转载 作者:行者123 更新时间:2023-12-03 13:26:22 30 4
gpt4 key购买 nike

我正在使用 R CMD build ABC 构建 R 包并收到此警告消息:

* building ‘milonga_1.0.tar.gz’
Warning: invalid uid value replaced by that for user 'nobody'

我不知道这意味着什么。有人能简单解释一下吗?

最佳答案

我总是得到这个。 tl;博士 你可以忽略它,它与tar的问题有关。 files 不能可移植地允许大于 32767 的用户 ID,但某些系统上的用户 ID 大于此值。

Winston Chang's Github mirror of the R source tree 上搜索代码在 src/library/utils/R/tar.R 中找到此代码:

 uid <- info$uid
## uids are supposed to be less than 'nobody' (32767)
## but it seems there are broken ones around: PR#15436
if(!is.null(uid) && !is.na(uid)) {
if(uid < 0L || uid > 32767L) {invalid_uid <- TRUE; uid <- 32767L}
header[109:115] <- charToRaw(sprintf("%07o", uid))
}

(这里是 link to the referenced bug reportother discussion on the devtools issue list )。

看着 /etc/passwd在我的系统上显示我有用户 ID 56347。

bolker:x:56347:1001:Ben Bolker,,,,:/home/bolker:/bin/bash



Wikipedia

POSIX requires the UID to be an integer type. Most Unix-like operating systems represent the UID as an unsigned integer. The size of UID values varies amongst different systems; some UNIX OS's[which?] used 15-bit values, allowing values up to 32767, while others such as Linux supported 16-bit UIDs, making 65536 unique IDs possible. The majority of modern Unix-like systems have switched to 32-bit UIDs, allowing 4,294,967,296 (232) unique IDs.





For compatibility between 16-bit and 32-bit UIDs, many Linux distributions now set it to be 2^16−2 = 65,534; the Linux kernel defaults to returning this value when a 32-bit UID does not fit into the return value of the 16-bit system calls.[11]



Brian Ripley says

A tarball can only store uids up to 'nobody' (usually 32767), and certainly larger ones cannot be unpacked portably. The warnings did not occur before, but the tarball produced could cause problems when unpacking with other tools.



我找不到更多关于此的文档(除了维基百科说有 15 位 uid 的 Unix 系统)。 GNU tar page似乎给 uid作为长度为 8 的字符类型...

关于r - 构建 R 包期间的警告消息 : invalid uid value replaced by that for user 'nobody' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30599326/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com