change apt source difficulty
HengyueLi opened this issue · comments
H. Li commented
In my area, the apt
install would be very slow. So I changed the sources.list
. Then I meet a problem. The details of the problem is described as following:
- stage 1: I found the
apt
command is extremely slow. So I update a mirror source by replacing/etc/apt/sources.list
. - stage 2: The command
RUN apt-get update...
will return the error
...#9 1.688 W: GPG error: http://mirrors.aliyun.com/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32...
- stage 3: After a little effort on searching, I find a solution, that is :
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3B4FE6ACC0B21F32
. But this command returns an error:#8 0.446 E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
. - stage 4: In order to install
gnupg
, I need firstapt install
. This will return back to stage 0. dead loop!
I also tried to install the package offline. But the lib dependence really frustrated me. Any solution?
By the way, is it possible to run the app without a docker?
H. Li commented
Here I attach the sources.list
file content:
deb http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main multiverse restricted universe
H. Li commented
this problem is finally solved by finding a way to login with a shell to the docker bash and use apt with proxy. Anyway, a simple application without docker is still preferred for me.
Qijia Liu commented
You may try https://github.com/eagleoflqj/sympy_beta if you don't mind AGPL