• kata agent install syslog


    112 packages can be upgraded. Run 'apt list --upgradable' to see them.
    bash: sudo: command not found
    root@ubuntu:/var/lib/dpkg# apt-get install sudo

    root@ubuntu:/# chown man:root /var/cache/man -R
    root@ubuntu:/# chmod g+s /var/cache/man -R

    /usr/bin/mandb: can't chmod /var/cache/man/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/sl/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/it/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/cs/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/ru/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/pl/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/hu/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/tr/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/sr/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/nl/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/zh_TW/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/ja/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/sv/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/pt/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/zh_CN/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/da/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/ko/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/es/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/fr/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/id/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/fi/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/pt_BR/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/de/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't chmod /var/cache/man/vi/CACHEDIR.TAG: Operation not permitted
    Errors were encountered while processing:
    rsyslog
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@ubuntu:/# chown man:root /var/cache/man -R
    root@ubuntu:/# chmod g+s /var/cache/man -R

    apt-get install rsyslog

    /usr/bin/mandb: fopen /var/cache/man/zh_CN/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/da/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/da/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/da/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/ko/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/ko/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/ko/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/es/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/es/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/es/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/fr/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/fr/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/fr/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/id/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/id/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/id/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/fi/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/fi/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/fi/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/pt_BR/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/pt_BR/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/pt_BR/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/de/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/de/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/de/21754: Permission denied
    /usr/bin/mandb: can't chmod /var/cache/man/vi/CACHEDIR.TAG: Operation not permitted
    /usr/bin/mandb: can't remove /var/cache/man/vi/CACHEDIR.TAG: Permission denied
    /usr/bin/mandb: fopen /var/cache/man/vi/21754: Permission denied
    Setting up cron (3.0pl1-128.1ubuntu1) ...
    Adding group `crontab' (GID 106) ...
    Done.
    Created symlink /etc/systemd/system/multi-user.target.wants/cron.service -> /lib/systemd/system/cron.service.
    update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
    invoke-rc.d: could not determine current runlevel
    Setting up logrotate (3.11.0-0.1ubuntu1) ...
    Setting up rsyslog (8.32.0-1ubuntu4) ...
    debconf: unable to initialize frontend: Dialog
    debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
    debconf: falling back to frontend: Readline
    
    Creating config file /etc/rsyslog.d/50-default.conf with new version
    Adding user `syslog' to group `adm' ...
    Adding user syslog to group adm
    Done.
    dpkg: error processing package rsyslog (--configure):
     installed rsyslog package post-installation script subprocess returned error exit status 1
    Processing triggers for systemd (237-3ubuntu10.43) ...
    Errors were encountered while processing:
     rsyslog
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@ubuntu:/# 
    提示这些代码是因为系统中缺少 dialog-like 程序,一般出现在最小化安装的ubuntu系统或者debian系统上。
    
    我们可以使用安装软件的方法解决(sudo权限):
    
    
    apt-get install dialog 或 apt-get install whiptail
    
    我们也可以修改debconf提示的方式,代码如下(sudo 权限)
    
    dpkg-reconfigure debconf

    dpkg-reconfigure debconf 手动选noninteractive,级别选high

    root@ubuntu:/# apt-get install rsyslog -y
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    rsyslog is already the newest version (8.32.0-1ubuntu4).
    0 upgraded, 0 newly installed, 0 to remove and 113 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
    Setting up rsyslog (8.32.0-1ubuntu4) ...
    The user `syslog' is already a member of `adm'.
    dpkg: error processing package rsyslog (--configure):
     installed rsyslog package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
     rsyslog
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    # 切路径
    cd var/lib/dpkg/ 
    # 将原有的info更名
    sudo mv info info.bak
    # 重建新的info
    sudo mkdir info
    # update一下, 并且安装所有的依赖
    sudo apt update && sudo apt -f install
    # 把info.bak中的文件全部移动到 info 中
    sudo mv info.bak/* info/
    # 删掉 info.bak
    sudo -rf info.bak
    root@ubuntu:/var/lib/dpkg# mv info.bak/* info/
    root@ubuntu:/var/lib/dpkg# rm -rf info.bak/
    root@ubuntu:/var/lib/dpkg# apt-get install rsyslog -y
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    rsyslog is already the newest version (8.32.0-1ubuntu4).
    0 upgraded, 0 newly installed, 0 to remove and 112 not upgraded.
    root@ubuntu:/var/lib/dpkg# apt-get install vim -y
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following additional packages will be installed:
      libgpm2 libpython3.6 vim-common vim-runtime xxd
    Suggested packages:
      gpm ctags vim-doc vim-scripts
    The following NEW packages will be installed:
      libgpm2 libpython3.6 vim vim-common vim-runtime xxd
    0 upgraded, 6 newly installed, 0 to remove and 112 not upgraded.
    Need to get 7854 kB of archives.
    After this operation, 37.1 MB of additional disk space will be used.
    Get:1 http://hk.ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 xxd arm64 2:8.0.1453-1ubuntu1.4 [48.3 kB]
    Get:2 http://hk.ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 vim-common all 2:8.0.1453-1ubuntu1.4 [70.4 kB]
    Get:3 http://hk.ports.ubuntu.com/ubuntu-ports bionic/main arm64 libgpm2 arm64 1.20.7-5 [14.4 kB]
    Get:4 http://hk.ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 libpython3.6 arm64 3.6.9-1~18.04ubuntu1.3 [1306 kB]
    Get:5 http://hk.ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 vim-runtime all 2:8.0.1453-1ubuntu1.4 [5435 kB]
    Get:6 http://hk.ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 vim arm64 2:8.0.1453-1ubuntu1.4 [979 kB]
    Fetched 7854 kB in 3s (2776 kB/s)
    debconf: delaying package configuration, since apt-utils is not installed
    E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
    Selecting previously unselected package xxd.
    (Reading database ... 39487 files and directories currently installed.)
    Preparing to unpack .../0-xxd_2%3a8.0.1453-1ubuntu1.4_arm64.deb ...
    Unpacking xxd (2:8.0.1453-1ubuntu1.4) ...
    Selecting previously unselected package vim-common.
    Preparing to unpack .../1-vim-common_2%3a8.0.1453-1ubuntu1.4_all.deb ...
    Unpacking vim-common (2:8.0.1453-1ubuntu1.4) ...
    Selecting previously unselected package libgpm2:arm64.
    Preparing to unpack .../2-libgpm2_1.20.7-5_arm64.deb ...
    Unpacking libgpm2:arm64 (1.20.7-5) ...
    Selecting previously unselected package libpython3.6:arm64.
    Preparing to unpack .../3-libpython3.6_3.6.9-1~18.04ubuntu1.3_arm64.deb ...
    Unpacking libpython3.6:arm64 (3.6.9-1~18.04ubuntu1.3) ...
    Selecting previously unselected package vim-runtime.
    Preparing to unpack .../4-vim-runtime_2%3a8.0.1453-1ubuntu1.4_all.deb ...
    Adding 'diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime'
    Adding 'diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime'
    Unpacking vim-runtime (2:8.0.1453-1ubuntu1.4) ...
    Selecting previously unselected package vim.
    Preparing to unpack .../5-vim_2%3a8.0.1453-1ubuntu1.4_arm64.deb ...
    Unpacking vim (2:8.0.1453-1ubuntu1.4) ...
    Setting up xxd (2:8.0.1453-1ubuntu1.4) ...
    Setting up libgpm2:arm64 (1.20.7-5) ...
    Setting up vim-common (2:8.0.1453-1ubuntu1.4) ...
    Setting up vim-runtime (2:8.0.1453-1ubuntu1.4) ...
    Setting up libpython3.6:arm64 (3.6.9-1~18.04ubuntu1.3) ...
    Setting up vim (2:8.0.1453-1ubuntu1.4) ...
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
    update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
    Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
    Processing triggers for mime-support (3.60ubuntu1) ...
    Processing triggers for libc-bin (2.27-3ubuntu1) ...
    root@ubuntu:/var/lib/dpkg# 
  • 相关阅读:
    说说ReactiveCocoa 2
    xcode5 添加Build Phases脚本
    关于CoreData的一个工具Mogenerator的使用
    Keystone controller.py & routers.py代码解析
    Openstack Restful API 开发框架 Paste + PasteDeploy + Routes + WebOb
    Openstack Restful API 开发框架 Paste + PasteDeploy + Routes + WebOb
    Web 开发规范 — WSGI
    Web 开发规范 — WSGI
    Openstack API 类型 & REST 风格
    Openstack API 类型 & REST 风格
  • 原文地址:https://www.cnblogs.com/dream397/p/14107510.html
Copyright © 2020-2023  润新知