As mentioned in ktor cli website, I'm trying to install it in my Linux machine. But I ended up with below error.
error: cannot install "ktor": persistent network error: Post https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io: Temporary failure in name resolution
Is it possible to install Ktor on Linux and how to create and run a project?
CodePudding user response:
The ktor cli explicitly supports linux and installation through snap
https://github.com/ktorio/ktor-cli
From that link you can install and create a project with
snap install --beta --classic ktor
and
ktor generate ktor-sample
respectively.
Your problem looks like it is related to your network's DNS and is an unrelated problem.
CodePudding user response:
try to ping first
ping api.snapcraft.io
64 bytes from api.snapcraft.io (185.xxx.xxx.xx): icmp_seq=189 ttl=53 time=23.6 ms
maybe your network issue
set up your proxy
sudo snap unset system proxy.http
sudo snap unset system proxy.https
sudo systemctl restart snapd
maybe your network interface card driver is not steady try to connect apt source
or use external tethering network for testing purpose
after that hit this command again
snap install --beta --classic ktor