Issue
I have just installed Ubuntu 18.04.1 LTS
and I am trying to use the make
command to compile my Makefile
which is located in the same directory
as my simple.c
file. After running make
I get the error that I don't have gcc
installed. When I try to install it, I get the errors below. The problem is that I can't install gcc and I don't know why? I will also put the Makefile
code also.
Error Output
gn:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-43.46
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 linux-libc-dev amd64 4.15.0-43.46
404 Not Found [IP: 91.189.91.26 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-43.46_amd64.deb 404 Not Found [IP: 91.189.91.26 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
MakeFile
obj-m += simple.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Solution
If sudo apt-get update
does not work for you, you should maybe try sudo apt-get clean
to clean the cache and then execute sudo apt-get update
Answered By - user10481362 Answer Checked By - Mary Flores (WPSolving Volunteer)