精华内容
下载资源
问答
  • Ubuntu 18 snap 占用 100%,卸载 snap

    千次阅读 2020-06-23 22:14:59
    Ubuntu 18.04 安装之后输入 df -h 之后有很多 snap 占用 100% ,如下所示。 wohu@ubuntu1804:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 2724552 0 2724552 0% /dev tmpfs 550960 1896 549064 1% /...

    1. 卸载 snap

    Ubuntu 18.04 安装之后输入 df -h 之后有很多 snap 占用 100% ,如下所示。

    wohu@ubuntu1804:~$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    udev             2724552         0   2724552    0% /dev
    tmpfs             550960      1896    549064    1% /run
    /dev/sda2      114337956  28723256  79763564   27% /
    tmpfs            2754780      5856   2748924    1% /dev/shm
    tmpfs               5120         4      5116    1% /run/lock
    tmpfs            2754780         0   2754780    0% /sys/fs/cgroup
    /dev/loop0         14848     14848         0  100% /snap/gnome-logs/40
    /dev/loop2         35584     35584         0  100% /snap/gtk-common-themes/319
    /dev/loop1          3840      3840         0  100% /snap/gnome-system-monitor/54
    /dev/loop3        259584    259584         0  100% /snap/electronic-wechat/7
    /dev/loop4          2304      2304         0  100% /snap/gnome-calculator/222
    /dev/loop5        144384    144384         0  100% /snap/gnome-3-26-1804/70
    /dev/loop6         13312     13312         0  100% /snap/gnome-characters/101
    /dev/loop7          3840      3840         0  100% /snap/gnome-system-monitor/45
    /dev/loop8        142848    142848         0  100% /snap/gnome-3-26-1804/64
    /dev/loop9          2432      2432         0  100% /snap/gnome-calculator/199
    /dev/loop11        14848     14848         0  100% /snap/gnome-logs/34
    /dev/loop12         2432      2432         0  100% /snap/gnome-calculator/180
    /dev/loop13         3840      3840         0  100% /snap/gnome-system-monitor/51
    /dev/loop10        90112     90112         0  100% /snap/core/5328
    /dev/loop14        13312     13312         0  100% /snap/gnome-characters/117
    /dev/loop15        14848     14848         0  100% /snap/gnome-logs/37
    /dev/loop16       143488    143488         0  100% /snap/gnome-3-26-1804/59
    /dev/loop17        89088     89088         0  100% /snap/core/4917
    /dev/loop18        13312     13312         0  100% /snap/gnome-characters/103
    /dev/loop19        89088     89088         0  100% /snap/core/5145
    /dev/sda1         523248      4744    518504    1% /boot/efi
    tmpfs             550956        16    550940    1% /run/user/120
    tmpfs             550956       156    550800    1% /run/user/1000
    

    卸载命令:

    sudo snap remove <snap name>
    

    例如:

    snap remove gnome-3-28-1804
    

    或者直接卸载 snap 应用

    sudo apt-get purge snapd
    sudo apt autoremove --purge snapd
    

    2. snap 介绍

    snap 是一种全新的软件包管理方式,它类似一个容器拥有一个应用程序所有的文件和库,各个应用程序之间完全独立。所以使用 snap 包的好处就是它解决了应用程序之间的依赖问题,使应用程序之间更容易管理。但是由此带来的问题就是它占用更多的磁盘空间

    snap 的安装包扩展名是 .snap ,类似于一个容器,它包含一个应用程序需要用到的所有文件和库( snap 包包含一个私有的 root 文件系统,里面包含了依赖的软件包)。它们会被安装到单独的目录;各个应用程序之间相互隔离。使用 snap 有很多好处,首先它解决了软件包的依赖问题;其次,也使应用程序更容易管理。

    展开全文
  • Ubuntu Snap 简述

    千次阅读 2019-12-10 15:22:27
    Ubuntu Snaps Ubuntu Snaps 是 Ubuntu 的母公司 Canonical 于 2016 年 4 月发布 Ubuntu...自 Ubuntu16.04 LTS 起,Ubuntu 操作系统可以同时支持 Snap 及 Debian 这两种格式的安装包。 与传统的 dpkg/apt 有着很大...

    Ubuntu Snaps

    Ubuntu Snaps 是 Ubuntu 的母公司 Canonical 于 2016 年 4 月发布 Ubuntu16.04 LTS(LongTermSupport,长期支持版)时引入的一种容器化的软件包格式。自 Ubuntu16.04 LTS 起,Ubuntu 操作系统可以同时支持 Snap 及 Debian 这两种格式的安装包。

    与传统的 dpkg/apt 有着很大的区别。Ubuntu Snaps 可以让开发者将他们的软件更新包随时发布给用户,而不必等待 Ubuntu 自身的发行版更新周期。其次 Snap 应用可以同时安装多个版本的软件而不会互相干扰,一个 Snap 应用的安装包拥有所有依赖的文件和库,各个 Snap 应用之间完全独立。比如同时安装 Python2.7 和 Python3.3 而不会造成冲突,这就是所谓的容器化软件包格式。由此带来的问题就是 Snap 应用会占用更多的磁盘空间。

    snapd 是 Snaps 软件包的管理用具,指令为 snap。Snapcraft 是开发人员将其程序打包为 Snap 格式的工具,可以从 GitHub 仓库自动构建,指令为 snapcraft

    REFS

    • https://snapcraft.io/
    • https://tutorials.ubuntu.com/tutorial/basic-snap-usage#0
    • https://tutorials.ubuntu.com/tutorial/advanced-snap-usage#0

    Snaps 工具使用示例

    安装 Snaps 支持

    sudo apt update  
    sudo apt install snapd 
    sudo apt install snapcraft  
    

    登录:使用 Ubuntu One 账户

    snap login your@email.lol
    

    从 SnapStore 寻找发布在商店里的 Snap 应用

    sudo snap find
    sudo snap find | grep  $SNAP_NAME
    

    安装一个 Snap 应用

    sudo snap install $SNAP_NAME
    

    卸载一个 Snap 应用

    sudo snap remove $SNAP_NAME
    

    查看一个 Snap 的详细信息

    snap info $SNAP_NAME
    

    显示已安装的 Snap 应用列表

    sudo snap list
    

    更新一个已安装的 Snap 应用

    sudo snap refresh $SNAP_NAME
    

    还原 Snap 应用到以前安装的版本

    sudo snap revert $SNAP_NAME
    

    编译一个 Snap 应用

    编译一个 Snap 应用:如果你开发或拥有了一个 Snap 项目,那么你只需要执行以下指令就会得到一个扩展名为 .snap 的文件,这个就是我们所需要的 Snap 应用安装文件。

    $ cd <your_poject_dict>
    $ snapcraft
    

    snapcraft 打包的过程中,它经历如下的几个阶段:

    1. pull: Download or retrieve artifacts defined for a part.
    2. build: Build artifacts defined for a part. Build systems capable of running parallel build jobs will do so unless “–no-parallel-build” is specified.
    3. stage: Stage the part’s built artifacts into the common staging area.
    4. prime: Final copy and preparation for the snap.
    5. snap: Create a snap.

    清除一个 Snap 应用在编译过程中的文件

    napcraft clean
    
    展开全文
  • 20170829 线上讲堂 - Ubuntu SnapUbuntu Core 技术介绍 视频 http://v.youku.com/v_show/id_XMjk5NzI1NDU5Ng==.html https://youtu.be/AfmTIqs7iSI
  • snap on ubuntu16.04

    2016-04-26 14:03:00
    今天试验了ubuntu 上最新的snap 软件格式。snap 软件格式确实比以前的.debian 格式有很大的不同。 官方文档如 https://developer.ubuntu.com/en/snappy/build-apps/your-first-snap/ 介绍了webcam-webui.snap的...

     

     今天试验了ubuntu 上最新的snap 软件格式。snap 软件格式确实比以前的.debian 格式有很大的不同。

     官方文档如

           https://developer.ubuntu.com/en/snappy/build-apps/your-first-snap/

     介绍了webcam-webui.snap的制作过程。稍微总结一些要点。

    1) snap 软件包把自己依赖的库都打包了。

       参照上文的例子,制作了一个webcam-webui.snap 的软件包。

          该软件包依赖fswebcam 应用程序。 包制作过程,直接就下载了该应用,一起打包了。

         这样做的好处是,假如用户删除了系统中的java 或者gcc 等该应用依赖的部件,该应用也可以运行。因为它自带了。

     2)安装过程

    使用snap install webcam-webui.snap命令可以用安装这个包。安装完毕后在/snap/webcam-webui/current/usr/bin下面,可以看到依赖包fswebcam

    3) 应用程序sandbox 的概念。

    snap install hello-world, 安装一个hello-world应用。 尝试执行hello-world.evil.

    警告说创建文件失败。即使你用root权限,也是如此。这是因为snap 不允许随意篡改系统文件。

     

    另外,采用snap包还有很多升级,安全方便的特性以及便利性。

    总的说来, snap 包格式的提出,是ubuntu 面向无人机,物联网设备市场进军的前奏。 该思路和docker image 也有异曲同工之处。应该会成为未来的主流。

     

    参考:

     

    1)如何使用snap命令

    http://www.sysgeek.cn/use-snap-packages-ubuntu-16-04/

     

    2) 如何制作snap 包

    https://developer.ubuntu.com/en/snappy/build-apps/your-first-snap/

     

    转载于:https://www.cnblogs.com/geeks/p/5434861.html

    展开全文
  • Snap (Ubuntu Linux)

    2021-01-11 05:18:41
    <div><p>Some new toys in the Ubuntu world: <p>https://developer.ubuntu.com/en/snappy/build-apps/your-first-snap/</p><p>该提问来源于开源项目:butterproject/butter-desktop</p></div>
  • Ubuntu snap packaging

    2020-11-26 11:44:59
    <div><p>I think in 1.6.0 timeline we should prioritize packaging for Ubuntu with snap: https://tutorials.ubuntu.com/tutorial/basic-snap-usage. After 1.6.0 we can also implement FlatPak, which is used ...
  • ubuntu用apt代替了apt-get,ubuntu的母公司Canonical在最新版的Ubuntu中用snap代替了apt。 类似于yum代替了rpm,而后又使用dnf代替了yum。 [Wed Mar 24 11:05 u20@u20-0-52 ~ ]$ type snap snap is /usr/bin/snap ...

    apt和snap

    ubuntu用apt代替了apt-get,ubuntu的母公司Canonical在最新版的Ubuntu中用snap代替了apt。
    类似于yum代替了rpm,而后又使用dnf代替了yum。

    [Wed Mar 24 11:05 u20@u20-0-52 ~ ]$ type snap
    snap is /usr/bin/snap
    [Wed Mar 24 11:06 u20@u20-0-52 ~ ]$ type apt
    apt is /usr/bin/apt
    [Wed Mar 24 11:06 u20@u20-0-52 ~ ]$ whatis snap
    snap (8)             - Tool to interact with snaps
    [Wed Mar 24 11:06 u20@u20-0-52 ~ ]$ whatis apt
    apt (8)              - command-line interface
    

    snap

    [Wed Mar 24 11:06 u20@u20-0-52 ~ ]$ snap help --all
    The snap command lets you install, configure, refresh and remove snaps.
    Snaps are packages that work across many different Linux distributions,
    enabling secure delivery and operation of the latest apps and utilities.
    
    Usage: snap <command> [<options>...]
    
    Commands can be classified as follows:
    
      Basics (basic snap management):
        find             Find packages to install
        info             Show detailed information about snaps
        install          Install snaps on the system
        remove           Remove snaps from the system
        list             List installed snaps
    
      ...more (slightly more advanced snap management):
        refresh          Refresh snaps in the system
        revert           Reverts the given snap to the previous state
        switch           Switches snap to a different channel
        disable          Disable a snap in the system
        enable           Enable a snap in the system
        create-cohort    Create cohort keys for a set of snaps
    
      History (manage system change transactions):
        changes          List system changes
        tasks            List a change's tasks
        abort            Abort a pending change
        watch            Watch a change in progress
    
      Daemons (manage services):
        services         Query the status of services
        start            Start services
        stop             Stop services
        restart          Restart services
        logs             Retrieve logs for services
    
      Permissions (manage permissions):
        connections      List interface connections
        interface        Show details of snap interfaces
        connect          Connect a plug to a slot
        disconnect       Disconnect a plug from a slot
    
      Configuration (system administration and configuration):
        get              Print configuration options
        set              Change configuration options
        unset            Remove configuration options
        wait             Wait for configuration
    
      App Aliases (manage aliases):
        alias            Set up a manual alias
        aliases          List aliases in the system
        unalias          Remove a manual alias, or the aliases for an entire snap
        prefer           Enable aliases from a snap, disabling any conflicting aliases
    
      Account (authentication to snapd and the snap store):
        login            Authenticate to snapd and the store
        logout           Log out of snapd and the store
        whoami           Show the email the user is logged in with
    
      Snapshots (archives of snap data):
        saved            List currently stored snapshots
        save             Save a snapshot of the current data
        check-snapshot   Check a snapshot
        restore          Restore a snapshot
        forget           Delete a snapshot
        export-snapshot  Export a snapshot
        import-snapshot  Import a snapshot
    
      Device (manage device):
        model            Get the active model for this device
        reboot           Reboot into selected system and mode
        recovery         List available recovery systems
    
      Warnings (manage warnings):
        warnings         List warnings
        okay             Acknowledge warnings
    
      Assertions (manage assertions):
        known            Show known assertions of the provided type
        ack              Add an assertion to the system
    
      Introspection (introspection and debugging of snapd):
        version          Show version details
        debug            Run debug commands
    
      Development (developer-oriented features):
        download         Download the given snap
        pack             Pack the given directory as a snap
        run              Run the given snap command
        try              Test an unpacked snap in the system
        prepare-image    Prepare a device image
    
    For more information about a command, run 'snap help <command>'.
    

    apt

    [Wed Mar 24 11:09 u20@u20-0-52 ~ ]$ apt --help
    apt 2.0.2ubuntu0.2 (amd64)
    Usage: apt [options] command
    
    apt is a commandline package manager and provides commands for
    searching and managing as well as querying information about packages.
    It provides the same functionality as the specialized APT tools,
    like apt-get and apt-cache, but enables options more suitable for
    interactive use by default.
    
    Most used commands:
      list - list packages based on package names
      search - search in package descriptions
      show - show package details
      install - install packages
      reinstall - reinstall packages
      remove - remove packages
      autoremove - Remove automatically all unused packages
      update - update list of available packages
      upgrade - upgrade the system by installing/upgrading packages
      full-upgrade - upgrade the system by removing/installing/upgrading packages
      edit-sources - edit the source information file
      satisfy - satisfy dependency strings
    
    See apt(8) for more information about the available commands.
    Configuration options and syntax is detailed in apt.conf(5).
    Information about how to configure sources can be found in sources.list(5).
    Package and version choices can be expressed via apt_preferences(5).
    Security details are available in apt-secure(8).
                                            This APT has Super Cow Powers.
    
    展开全文
  • Ubuntu Snap packages

    2021-01-08 10:29:32
    <div><p>User requested Ubuntu Snap packages, which I gather are sort of like Flatpak, only not? I have no idea how to serve a Snap, but at least Ubuntu Core would want one of those. ┆Issue is ...
  • <ul><li>Current naming of snapd and snapctl conflicts with snap/snapd package shipped by default starting Ubuntu 16.04 and snapctl starting 16.04.1</li><li>snapctl/snapd conflicts with ubuntu'...
  • Ubuntu使用snap

    2018-09-20 12:54:00
    转载自: https://www.bboysoul.com/2017/11/15/ubuntu%20%E4%BD%BF%E7%94%A8snap%E5%8C%85/ ...下面这篇文章就来给大家详细介绍了关于ubuntusnap包的安装、更新删除与简单使用的相关资料,需要的朋友可以参考借...
  • Distributor ID: Ubuntu Description: Pop!_OS 18.04 LTS Release: 18.04 Codename: bionic </code></pre> <p>This is what it looks like for me: <p><img alt="hamster-snap1" src=...
  • Snap package for Ubuntu Core

    2020-11-30 11:05:45
    m working on Ubuntu Core snap package for weechat that will run on Raspberrypi. <p>So far I was able to run snapcraft cross compilation on travis and submit snap directly to ubuntu store - everything ...
  • Canonical公司于最近2016年4月发布了一个新的16.04系统,并且这个系统是长期支持版(Long Term Support - LTS)....16.04的桌面中支持两种格式的安装包:snap及debian.snap的最大不同是:snap应用可以安装同
  • <div><p>After installing from Ubuntu Software, and trying to hit the Launch button: "Something went wrong, Desktop file didn't specify exec field." <p>Went into terminal and tried to run ...
  • <p>Would it be an issue between host systemd resolv and snap ubuntu core resolvconf ? <pre><code> Error | internet_connection_check | GuzzleHttp\Exception\ConnectException: cURL error 6: Could not ...
  • ubuntu snap加速

    2021-03-03 22:32:16
    在/etc/hosts中增加: 91.189.91.43 darkbowser.canonical.com
  • ubuntu snap的卸载

    千次阅读 2020-02-05 20:43:48
    列出已经安装的snap包 sudo snap list 卸载snap中安装的包 sudo snap remove <package-name> 卸载snap-core sudo apt autoremove --purge snapd
  • Ubuntu snap for 树莓派

    2017-09-11 13:06:00
    Ubuntu 面向工控设备/物联网设备研发的嵌入式操作系统被命名为 ...使用新的软件包管理器 snap VirtualBox 虚拟机下首次运行 Ubuntu Core 的截图如下: 图1 使用烧录了 Ubuntu Core 操作系统的 SD 存储卡首次...
  • 原标题:开发者决定放弃 SnapUbuntu,因自动更新出错且无法禁用近日,荷兰开发者 Remy van Elst 通过自己的博客控诉了 snap 自动更新所带来的问题,并决定删除 snap,同时选择放弃 Ubuntu。升级到 Ubuntu 20.04 ...
  • <div><p>Unhandled Promise Rejection .../home/kevin/snap/email-securely-app/x1/.config/email-securely-app/config.json.1511853580'</p><p>该提问来源于开源项目:vladimiry/ElectronMail</p></div>
  • 首先安装snap, apt-get install snapsnap用法查看snap版本信息snap --version找出所有snap应用snap find安装应用snap install 包名重启应用snap restart 应用名升级应用snap refresh 应用名查看安装的应用snap list...
  • <div><p>Replacing /etc/resolv.conf with a tailscale specific version breaks any snaps on Ubuntu as the tailscale version of the resolv.conf file is not allowed to be accessed inside the snap. ...
  • 原标题:Ubuntu 20.04 将Ubuntu软件中心切换到Snap商店正文默认情况下, 即将发布的Ubuntu 20.04版本将附带Snap版本的Ubuntu软件应用。虽然Ubuntu的默认软件管理工具将从Ubuntu 20.04开始成为预提供的Snap应用程序,...
  • Ubuntu 使用 snap 常用操作

    万次阅读 2018-12-25 17:42:51
     SnapUbuntu母公司Canonical于2016年4月发布Ubuntu16.04时候引入的一种安全的、易于管理的、沙盒化的软件包格式,与传统的dpkg/apt有着很大的区别。  Snap可以让开发者将他们的软件更新包随时发布给用户,而...
  • 近日,荷兰开发者 Remy van Elst 通过自己的博客控诉了 snap 自动更新所带来的问题,并决定删除 snap,同时选择放弃 Ubuntu。升级到 Ubuntu 20.04 版本后,Remy 通过 snap 安装了 CLion,因为与手动下载安装相比,...
  • <p>I installed the <code>bitwarden</code> cli via <code>snap install bitwarden</code> however when I try to run <code>bitwarden login</code> this is the error I come across <pre><code> 2018-10-24 01:...
  • m trying to install via snap and spotifyd won't load after install. Looking into the snap directory there's only empty folders: <pre><code> ~/snap/spotifyd/ 6/ - empty common/ - empty ...
  • <div><p>Trying on Ubuntu Bionic: <pre><code> # /snap/bin/bpftrace bashreadline.bt Attaching 2 probes... Tracing bash commands... Hit Ctrl-C to end. TIME PID COMMAND ^C # /usr/bin/bpftrace ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 3,910
精华内容 1,564
关键字:

snapubuntu