lsb_release: command not found in latest Ubuntu Docker container

老子叫甜甜 提交于 2020-06-08 03:30:07

问题


I just wanted to test something out real quick. So I ran a docker container and I wanted to check which version I was running:

$ docker run -it ubuntu    
root@471bdb08b11a:/# lsb_release -a
bash: lsb_release: command not found
root@471bdb08b11a:/# 

So I tried installing it (as suggested here):

root@471bdb08b11a:/# apt install lsb_release
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package lsb_release
root@471bdb08b11a:/# 

Anybody any idea why this isn't working?


回答1:


It seems lsb_release is not installed.

you can install it via

apt-get update && apt-get install -y lsb-release && apt-get clean all

Hope that helps ;)



来源:https://stackoverflow.com/questions/58395566/lsb-release-command-not-found-in-latest-ubuntu-docker-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!