无法获取某些档案,可能使用Mobaxterm运行apt-get更新

时间:2018-12-26 11:08:40

标签: apt mobaxterm

我下载了Mobaxterm以使用Bash shell。问题是,我无法使用“ cc -o file file.c”编译我的C文件。它告诉我这个:

找不到命令“ cc”,但可以使用以下命令安装

sudo apt install gcc

sudo apt install clang

sudo apt install pentium-builder

sudo apt install tcc

但是,每当我键入这些命令时,它都会向我返回错误消息,例如:

Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev
amd64 4.15.0-29.31
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev
 amd64 4.15.0-29.31
  404  Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-29.31_amd64.deb  404  Not Found [IP: 91.189.
88.162 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
mainuser@DESKTOP-AN5KMJ2:/mnt/c/Users/LEPCDC~1/Desktop$ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/

1 个答案:

答案 0 :(得分:-1)

转到网站的“插件”部分并下载插件   Gcc,G ++和开发工具:GNU C / C ++编译器和其他开发工具。 它将下载名为 Development.mxt3 的文件 现在转到@Override public boolean isRoleAllowed(long userId, long roleId) throws PortalException { //If the Admin(10207) role is being added through the Control Panel (i.e without the LoginController code), then return false i.e do not allow the admin role to be added if(roleId==new Long(10207)){ System.out.println("isAdminRoleAssignmentAllowed false"); return false; } else{ System.out.println("isAdminRoleAssignmentAllowed true"); return true; } } } 文件夹并将下载的文件粘贴到此处。 Copying the plugin file here

打开应用程序的终端,现在您就可以编译

C:\Program Files (x86)\Mobatek\MobaXterm\

并运行如下

cc -o file file.c

compile & run