你这个问题里可能混了两个点,我分开说明一下:
如果你的意思是 “在 Debian 上怎么更新系统 / 软件包”,常用命令如下:
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove
如果你指的是 C 语言中的 opendir(),那它是一个 系统调用 / glibc 函数,不是软件包,不需要单独更新。
opendirreaddirclosedirglibc(GNU C Library)
sudo apt update
sudo apt upgrade libc6
⚠️ 注意:
sudo apt install build-essential
#include <dirent.h>
#include <stdio.h>
int main() {
DIR *dir = opendir(".");
struct dirent *entry;
while ((entry = readdir(dir)) != NULL) {
printf("%s\n", entry->d_name);
}
closedir(dir);
return 0;
}
gcc test.c -o test
请确认一下你指的是:
opendir 函数?你可以把 报错信息或上下文贴出来,我可以更精确地帮你。