APT: Package ‘vnc4server‘ has no installation candidate 排查过程及解决方法
找不到 vnc4server
想安裝 vnc4server,于是 sudo apt-get insall vnc4server,然而找不到包,說 Package ‘vnc4server‘ has no installation candidate,apt-cache search vnc4server 也搜不到這個包。
解決方法
參考:https://blog.csdn.net/weixin_41879093/article/details/108891958
參考:Package 'vncviewer ’ has no installation candidate
All this means is that there is no package that exists in your sources list that matches that name exactly. The best approach (IMHO) to take when faced by an issue like this is to begin by checking Ubuntu Package Search using the keyword of what you were trying to find. In this case “vncviewer” is actually embedded in the valid package name. Even if it wasn’t you can still search the package contents for specific filenames which can also be a successful way of locating which package contains a command/program you are attempting to locate. Either of which should get you where you are attempting to go.
In your specific case, you have a couple of easy options. Both of which require enabling the Universe Repository first.
Once that is complete, you can either install the gtk version with sudo apt install gvncviewer or the X version with sudo apt install xtightvncviewer
The GTK version has fewer dependencies and a smaller package size. There’s a decent (if somewhat dated) Community Help wiki on VNC Clients.
具體步驟
在網站 Ubuntu Packages Search 上搜索 vnc4server,并且在 distribution 選項上選 any 來從每個版本的軟件中查找。
可以看到 vnc4server 這個軟件是在版本 bionic 中,并且屬于 universe 倉庫。
有上面的那些信息后,我們可以在文件 /etc/apt/sources.list 中添加:
在添加完后,執行以下命令更新一下再重新安裝就可以了。
雖然博主的 Ubuntu 版本是 focal (20版本),但是同樣安裝成功了。
總結
以上是生活随笔為你收集整理的APT: Package ‘vnc4server‘ has no installation candidate 排查过程及解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: leetcode 686. Repeat
- 下一篇: leetcode 239. Slidin