[PLEASE HELP] Can't Update and install package on Ubuntu!
Got my 128MB VPS from MrVM.net and work great for much time (5-6 months). After last REinstallation of ubuntu (i've tried Ubuntu 15 - 16 - 18 - 18 minimal and also Debian) apt update
get following error:
Reading package lists... Done W: GPG error: http://archive.ubuntu.com/ubuntu bionic InRelease: At least one invalid signature was encountered. E: The repository 'http://archive.ubuntu.com/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://archive.ubuntu.com/ubuntu bionic-updates InRelease: Couldn't create temporary file /tmp/apt.conf.hAzea6 for passing config to apt-key E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
how can i solve?
I've also tried to reinstall many many times the OS and got NO PUBLICKEY, i've tried to add Public Key with this command apt-key add key.txt
but get this error:
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
... but i can't update and install packages!!!
Hope you can help me, i have many years of experience on linux in general but this problem is bringing my head into fire!!! Ahahahah
Thank you all guys for help!
Comments
Check if your /tmp is full or has proper permission.
https://phpbackend.com/
According to https://www.reddit.com/r/linux4noobs/comments/5dx7rh/gpg_errors_in_ubuntu_1604_when_updating/?utm_source=share&utm_medium=ios_app&utm_name=iossmf
It will be solved by running
sudo rm -rf /etc/apt/trusted.gpg.d/*
I take no responsibility for the suggested solution.
“Technology is best when it brings people together.” – Matt Mullenweg
Thanks for your reply.
/tmp permission is
I've already tried
rm -rf /etc/apt/trusted.gpg.d/*
in last days but I tried again to do it, Now i got different message:(NO_PUBKEY)
What i need now is to add the PUBKEY (and this should be simple) , so i go on
http://keyserver.ubuntu.com/
and past my "NO_PUBKEY 3B4FE6ACC0B21F32" i need to paste it on website adding 0x, so 0x3B4FE6ACC0B21F32, then i get PUBKEY to add on my server, copy and past it on/home/key.txt
(with 755 permission, to make it work smoothly).Now I should be ready to solve, I proceed with the command:
ERROR (I KNEW IT!!)
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
I need to install the package, so i need to do
apt update
andapt install gnupg2(or gnupg or gnupg1)
i can't do
apt update
so i've triedapt install gnupg
andapt install gnupg1
With
apt install gnupg
i got:With
apt install gnupg1
i got:only
apt install gnupg2
give me this error:I hope all these steps are useful to someone, in my case unfortunately they did not solve the problem and i'm still searching a solution
you could search for packages needed for whatever you are on right now and download them directly and install via dpkg, though I guess gnupg will depend on quite some more packages which might be missing as well... https://packages.ubuntu.com/bionic/gnupg
you could also do something like
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update
to get your update of packages and maybe
apt-get --allow-unauthenticated upgrade
or install to get missing packages. weird anyway, that this does not work correctly even after reinstall.
@DalaDala
What happens when you do a
apt upgrade
Do you get any progress with that ?
after that try
apt update
Best to do after another clean, but also try in current state too.
I have a hunch that I have came across this particular issue.
This is
df -h
(this is important to know for help)This is
apt upgrade
and this is
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update
after @Falzo helpNOTE: Still present " NO_PUBKEY 3B4FE6ACC0B21F32 " in logs
tried to download and install gnupg from
https://packages.ubuntu.com/bionic/amd64/gnupg/download
but every dependency have 4+ dependency.. i need to download and install many .deb package (probably i need some weeks)I don't understand what caused this problem ... yet the system is clean and freshly installed and I reinstall it at each test to try more solutions. Right now the VPS is unusable as I can't install anythings with apt, this is weird problem
So why not
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true install gnupg
The wise receive respect. The dumb demand respect.
Sometimes "apt clean" helps with cleaning the cached downloaded content.
The wise receive respect. The dumb demand respect.
So you are running out of space. "apt clean" before other apt operations might help. You may want to check which partition is running out of space and make some space by deleting unwanted content before apt operations.
The wise receive respect. The dumb demand respect.
I'm a bit puzzled as well but here are some (more possibly useless) thoughts:
/etc/apt/trusted.gpg.d/
)Thanks for your reply @nullnothere
These are my tests and reply:
1. I'm using 128mb VPS since 3 years and they have always worked well, i've also installed ts3 server and used it for months! Somewhere there are also 64mb vps but i think 128mb is the minimum acceptable;
2. I don't understand what do you mean with "Template", if you mean Ubuntu version => i've tried Ubuntu 15, 16, 18 and 18 minimal (also debian);
3. I've tried this right now, it fix only the missing KEY (fix NO_PUBKEY 3B4FE6ACC0B21F32) but i still have apt problem, see following NOTE;
4. i don't have dstat installed, i search on google how to deal with it
NOTE
i think signature error depending on this error
Couldn't create temporary file /tmp/apt.conf.4epOCX for passing config to apt-key
. Now i'm focused to solve this tmp file creation, i try.Anyway
apt-clone
can be a solution but i can't install it because it have many, many, many dependencies. (but this can help someone, i hope).However, I want to thank everyone for the help and explanations you are giving me, we are facing the problem head on!
@KamalW
already tried
apt-clean
unfortunately is not the solution in my case@DalaDala as you say already tried reinstalling the os, that should have fixed the issue.
It is maybe an os template or container problem, you should create a ticket.
https://webhorizon.net
There were multiple errors here.
Here is what was made to fix the issue in total.
rm -rf /etc/apt/trusted.gpg.d/*
edit /etc/apt/sources.list
add [trusted=yes] to every repo
Example: deb [trusted=yes] http://localmachine/debian wheezy main
run:
apt --fix-broken install
run:
apt-get update
apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 3B4FE6ACC0B21F32
if this fails (it did on the VPS) due to a shared library was missing
run:
apt-get install gnupg
and then re-run the
apt-key adv
command“Technology is best when it brings people together.” – Matt Mullenweg
Thanks to @mikho and all of you for your help! Now everything works like a charm!
remember to remove [trusted=yes] from /etc/apt/sources.list when all is done.
“Technology is best when it brings people together.” – Matt Mullenweg
Bye bye
blog | exploring visually |