Setting up Distrobox on Ubuntu 22.04 (**)

debian 11 安装 distrobox( 含:AI自动生成的解决方案)  https://blog.csdn.net/ken2232/article/details/139407274  

------

在 debian 11 (12 OK)中运行 distrobox 的问题:

How to change the display name on the Terminal? 如何识别终端是运行在哪一个容器里? (**)  https://blog.csdn.net/ken2232/article/details/139538759 

-----------------------------------------------------------------

关联参考:

Setting up Distrobox on Ubuntu 22.04 (**)  https://blog.csdn.net/ken2232/article/details/139427024

How to change the display name on the Terminal? 如何识别终端是运行在哪一个容器里? (**)   https://blog.csdn.net/ken2232/article/details/139538759

在 debian 11 与 12 上安装 distrobox 的区别 汇总  https://blog.csdn.net/ken2232/article/details/139583920 

debian 11 安装 distrobox( 含:AI自动生成的解决方案)  https://blog.csdn.net/ken2232/article/details/139407274 

distrobox 安装 与 卸载  https://blog.csdn.net/ken2232/article/details/139493805   

-----------------------------------------------------------------

22.04 官仓 apt 没有,snap 包显示不支持这个版本。

snap 跨发行版?跨平台?加入 app 本色就不能跨版本使用时

$ sudo snap install distrobox --edge。所谓的跨,就是空谈了,特别是对于那些本身就与硬件密切相关的 app。
[sudo] password for colating:
error: The publisher of snap "distrobox" has indicated that they do not
       consider this revision to be of production quality and that it is only
       meant for development or testing at this point. As a consequence this
       snap will not refresh automatically and may perform arbitrary system
       changes outside of the security sandbox snaps are generally confined to,
       which may put your system at risk.

       If you understand and want to proceed repeat the command including
       --devmode; if instead you want to install the snap forcing it into
       strict confinement repeat the command including --jailmode.

------

ubuntu系统:Setting up Distrobox on Ubuntu 22.04  https://nathanaelgandhi.com/computing/linux/2023/03/16/Setting-Up-Distrobox-on-Ubuntu-22.04.html

distrobox PPA: https://launchpad.net/~michel-slm/+archive/ubuntu/distrobox 

评点:Setting up Distrobox on Ubuntu 22.04  << 采用这个方法,

好像可用。但在 容器中,在终端上的显示 a@b 还是与宿主机相同。

可以使用下一条命令,以区分终端到底是运行在宿主机?还是容器?:

cat /etc/lsb-release

也可以直接在 shell 中设置自定义的显示信息,或其他区别方法。

参考:查看 Linux 发行版名称和版本号的 8 种方法  https://linux.cn/article-9586-1.html 

24.04 会自动显示出终端到底是哪一个?但是,这个版本是目前的最新版本,安装旧版的 Qt,好像不如 22.04 那么顺畅?

------

非 ubuntu系统:Install Distrobox on your Linux distribution https://snapcraft.io/distrobox   

------------

安装,似乎并不困难。但是,安装之后,是否全部功能都能够安全可用,这才是关键。

  https://github.com/89luca89/distrobox/releases/tag/1.7.2.1 
  https://github.com/89luca89/distrobox/archive/refs/tags/1.7.2.1.zip 

在下载的 distrobox-1.7.2.1.zip 压缩包内,有 install /uninstall 脚本 ?

在 debian 11 上,可以安装,初步测试,常用的主要功能,可以使用。但 podman 的的版本有些旧 3.0.1。

podman 这类软件与操作系统的关系密切,目前只看到有 2种安装方式,即 apt 安装,编译安装。

apt 安装只能在 debian 12、及之后的版本,debian 官方仓库才有;编译安装太麻烦了,除非是他别的需要才会去做吧?

这类与硬件关系密切的 app,可能需要采用官方测试过的安装包,可用性才会有一定的保障吧?  https://github.com/89luca89/distrobox 

------------

注意:

Ubuntu 22.10 and 23.04 在 ubuntu 官方仓库中,已经有了 https://github.com/89luca89/distrobox/tree/main/docs  ;直接 apt install 即可。

从 distrobox官网,可知:22.04 是未经 distrobox 官方认证?认可的;因此,即使能够成功安装,但是,实际运行是否存在问题?未知

在 debian 11 上,可能无法使用 distrobox?

  https://snapcraft.io/install/distrobox/debian 

注:采用 sudo snap install distrobox --edge 方法来安装 snap 包,好像在 debian 11上不能安装?在 12 上可以。在 11 上可以直接到 distrobox 官网下载如 1.7.2.1.zip来安装,初步测试,OK ?

           ##

$ sudo snap install distrobox --edge
error: The publisher of snap "distrobox" has indicated that they do not consider this revision to
       be of production quality and that it is only meant for development or testing at this point.
       As a consequence this snap will not refresh automatically and may perform arbitrary system
       changes outside of the security sandbox snaps are generally confined to, which may put your
       system at risk.

       If you understand and want to proceed repeat the command including --devmode; if instead you
       want to install the snap forcing it into strict confinement repeat the command including
       --jailmode.

            ##

$ sudo snap install distrobox --edge --devmode

好像只支持 docker 的 cs模式 ?

            ##

$ snap run distrobox create -n debian_12 -i docker.io/library/debian
Image docker.io/library/debian not found.
Do you want to pull the image now? [Y/n]: y
Using default tag: latest
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

snap隔离级别

有三种隔离级别:

    Strict - 严格

    默认级别,大多数snap软件都是用该级别。该级别可以认为是安全的,因为它仅提供了最小的访问权限。在没有特殊授权的的情况下,软件不能访问文件、网路、进程等系统资源。

    Classic - 传统

    和传统安装的软件一样,可以访问系统资源。因此,需要手动授权,或在安装时带上--classic参数。

    Devmode - 开发模式

    为开发者提供的特殊模式。软件可以完全访问系统资源,并会输出调试信息。安装时需带上--devmode参数。

链接:https://www.jianshu.com/p/70622b2e9c5d
 

Setting up Distrbox on Ubuntu 22.04

https://nathanaelgandhi.com/computing/linux/2023/03/16/Setting-Up-Distrobox-on-Ubuntu-22.04.html

Distrobox allows you to use any Linux distribution inside your terminal and run applications from these distributions as if they were installed natively.

Why I am writing this guide

At the time of writing, Distrobox was not available in the Ubuntu 22.04 repositories. So I tired the next logical step (at least for me), installing distrobox from the provided script. This didn’t give me the plug-and-play experience I was hoping for, and as such, I delved more enthusiastically into the documentation. I found this little gem (PPAs) buried on the compatibility page: distrobox : Michel Lind

Will I need this guide for Ubuntu 22.10 and later?

For those curious as to whether this guide will be necessary for Ubuntu 22.10 and later versions, Distrobox is available in the default repositories of Ubuntu 22.10 and 23.04 versions, courtesy of michel-slm. Therefore, it will not be necessary to follow this guide in the future; simply execute “apt install distrobox.”

While it is currently unclear whether Distrobox will continue to be available in later versions beyond 23.04, it stands to reason that the continued adoption of this amazing software will ensure its longevity.

How to install Distrobox on Ubuntu 22.04?

  1. Add the PPA

     sudo add-apt-repository ppa:michel-slm/distrobox
    
  2. Update apt

     sudo apt update
    
  3. Install distrobox

     sudo apt install distrobox -y
    

These steps successfully installed Distrobox on my system!

Next steps

Now that I have Distrobox installed, I used it to quickly grab Elixir and run some scripts.

My next step is to experiment with exporting apps to my host system, followed by using different architectures. If I can compile and test code “on” Arm, that would be a pretty useful.


ERRO / sudo: add-apt-repository: command not found

报错解释:

这个错误表明你尝试使用sudo来执行add-apt-repository命令,但是系统中没有找到这个命令。这通常发生在Ubuntu或者基于Ubuntu的Linux发行版上,因为add-apt-repository是一个用于添加PPA(个人包归档)的工具,而在一些较新的Ubuntu版本中,这个工具已经被集成到了software-properties-common包中。

解决方法:

    如果你使用的是Ubuntu 20.04 LTS或更新的版本,你需要安装software-properties-common包来获取add-apt-repository命令。可以使用以下命令安装:

sudo apt update
sudo apt install software-properties-common

    如果你已经安装了software-properties-common,但是仍然遇到这个错误,可能是因为add-apt-repository不在环境变量的路径中。你可以尝试直接调用它的全路径来解决这个问题:

sudo /usr/sbin/add-apt-repository <repository>

替换<repository>为你想要添加的仓库。

    如果你使用的是较旧的Ubuntu版本,可能需要更新你的系统,并安装python-software-properties包,因为在较旧的Ubuntu版本中,这个命令是包含在python-software-properties包中的。

确保在执行任何命令之前,你已经了解了该命令的作用以及它可能造成的影响,并且在执行sudo命令时总是小心谨慎,因为它需要管理员权限。
提示:AI自动生成,仅供参考

在 debian 上,是无法安装 PPA 仓库的?

Err:6 http://ppa.launchpad.net/michel-slm/distrobox/ubuntu oracular Release
  404  Not Found [IP: 2620:2d:4000:1::81 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/michel-slm/distrobox/ubuntu oracular Release' does not have a Release file.
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.

  • 9
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值