AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-373893

balon's questions

Martin Hope
Fco Javier Balón
Asked: 2023-01-21 05:16:03 +0800 CST

Como usar sed com variável, quando a variável é um texto aleatório (certificado)

  • 7

Estou tentando fazer um shell script bash que monte, a partir de algumas variáveis ​​pré-obtidas, um arquivo de texto.

Para isso utilizo o sed, alterando os flags do arquivo pelo desejado:

sed "s/this is a line in text/$var/g" file

Funciona corretamente e sem problemas. No entanto, a $varvariável geralmente possui caracteres estranhos, muitas vezes sendo chaves criptográficas, como:

-----BEGIN CERTIFICATE-----
MIID0DCCArigAwIBAgIJAMZxe+Z+DbdtMA0GCSqGSIb3DQEBCwUAME4xCzAJBgNV
BAYTAi0tMQswCQYDVQQIEwItLTELMAkGA1UEBxMCLS0xCzAJBgNVBAoTAi0tMRgw
FgYJKoZIhvcNAQkBFgltZUBteS5vcmcwHhcNMjEwODI1MDgyODMzWhcNMzEwODIz
MDgyODMzWjBOMQswCQYDVQQGEwItLTELMAkGA1UECBMCLS0xCzAJBgNVBAcTAi0t
MQswCQYDVQQKEwItLTEYMBYGCSqGSIb3DQEJARYJbWVAbXkub3JnMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1VtgDdOnhyGGd3OQO+QHcqfiH1wP1wJC
5MPZFm9FOQKC74FscbeLflu+hXVSLQQjP8XgJrbCk+xNe+SFOLMoIG mpxvRsjZU
eLzA5lUR8PvmBvgt1iR s1AQQAyh6R7z5QdwamsjmyoE1Si6maRzeCiv46qmlyet
iUEqbXslMk8N6Pa3KsKskv7BgzSOlfLHuWaZScewViGBSbyKUUYV0ljWbGozs21i
w FftSM6JnyNIq6l0wvGYkpJoDpGyxeNPTykswSO6WsG5o8ogJYOQR3KduUqdalj
tHbBsnGB1PNqfhpkBn75FY 8aNryND+uYkkQu1fGVJG0j2XVcPSPpBywZSwGtcCO
LPTL9OIYlRzzVi vTS CRx4NqSY=
-----END CERTIFICATE-----

Quando isso acontece, o sedcomando é interrompido, resultando em:

sed: -e expression #1, char 39: unterminated `s' command

Entendo que o conteúdo da variável é interpretado por sedcomo parte do sedcomando, dando o erro.

Existe uma maneira de enviar a variável para sedcomo texto simples e que não seja interpretado? Se não for possível, existe alguma alternativa simples para substituir sedneste caso?


Atualize com comprovação de que o conteúdo do certificado possui o caractere especial /.

cat ca.crt | grep "\/"

grep: warning: stray \ before /
5MPZFm9FOQKC74FscbeLflu+hXVSLQQjP8XgJrbCk+xNe+SFOLMoIG/mpxvRsjZU
eLzA5lUR8PvmBvgt1iR/s1AQQAyh6R7z5QdwamsjmyoE1Si6maRzeCiv46qmlyet
gUX/9Bunyu65hQ+h5kV4aWMRgnDH8HoTQsrJQd4eshHwsqgQA3+Oou4m6GLihkfC
QwsENypmlOiOeYvmxBC0X/w/2IeZMEDbmrMO0yUL6No9xQan7wKNFwIDAQABo4Gw
ggEBAJBDpHQBNlFoMjeQrH1szNe+30rp3ECCwXH4L+qKegobZ5/+joWSk84pRF0J
w/FftSM6JnyNIq6l0wvGYkpJoDpGyxeNPTykswSO6WsG5o8ogJYOQR3KduUqdalj
tHbBsnGB1PNqfhpkBn75FY/8aNryND+uYkkQu1fGVJG0j2XVcPSPpBywZSwGtcCO
LPTL9OIYlRzzVi/vTS/CRx4NqSY=
bash
  • 3 respostas
  • 267 Views
Martin Hope
Fco Javier Balón
Asked: 2022-12-01 03:02:24 +0800 CST

Entendendo os arquivos power_supply

  • 6

É uma questão muito simples, mas acho que na sua simplicidade tem saída aqua.

o caso é que estou interessado em entender melhor os arquivos que estão hospedados no /sys/class/power_supply, e que gerenciam o monitoramento da bateria do sistema. No meu caso, uso um laptop com bateria, cujo diretório está localizado em /sys/class/power_supply/BAT0. Por outro lado, tenho a interface ac-ADaPter em /sys/class/power_supply/AC0, pelo que entendi daqui .

Dentro da interface da bateria, encontro vários arquivos:

/sys/class/power_supply/BAT0$ ls
alarm               model_name
capacity            power
capacity_level      present
charge_full         serial_number
charge_full_design  status
charge_now          subsystem
current_now         technology
cycle_count         type
device              uevent
hwmon2              voltage_min_design
manufacturer        voltage_now

Entendo essa capacityreferência à porcentagem atual da bateria. eu também entendo por contexto capacity_levele status:

/sys/class/power_supply/BAT0$ cat capacity
81

/sys/class/power_supply/BAT0$ cat capacity_level
Normal

/sys/class/power_supply/BAT0$ cat status
Discharging

no entanto, não entendo outros arquivos como charge_full, charge_full_design, charge_nowou :current_nowcycle_count

/sys/class/power_supply/BAT0$ cat charge_full
900000
/sys/class/power_supply/BAT0$ cat charge_full_design
4100000
/sys/class/power_supply/BAT0$ cat charge_now
630000
/sys/class/power_supply/BAT0$ cat current_now
1191000
/sys/class/power_supply/BAT0$ cat cycle_count
0

Na ueventaula você pode revisar cada variável anterior, com mais alguns detalhes:

POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=11400000
POWER_SUPPLY_VOLTAGE_NOW=11759000
POWER_SUPPLY_CURRENT_NOW=1089000
POWER_SUPPLY_CHARGE_FULL_DESIGN=4100000
POWER_SUPPLY_CHARGE_FULL=900000
POWER_SUPPLY_CHARGE_NOW=675000
POWER_SUPPLY_CAPACITY=75
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=standard
POWER_SUPPLY_MANUFACTURER=OEM
POWER_SUPPLY_SERIAL_NUMBER=00001

Entendendo claramente que a porcentagem de capacidade da bateria vem do cálculo de POWER_SUPPLY_CHARGE_NOW( /sys/class/power_supply/BAT0/charge_now) sobre POWER_SUPPLY_CHARGE_FULL( /sys/class/power_supply/BAT0/charge_full): 100*675000/900000=75.

Mas como entender esses valores? de onde POWER_SUPPLY_CHARGE_NOWvem? a voltagem dos valores acima interfere em alguma coisa?

linux
  • 1 respostas
  • 47 Views
Martin Hope
Fco Javier Balón
Asked: 2022-11-24 03:14:48 +0800 CST

Conexão cliente SSH sem banner (no cliente)

  • 5

Estou desenvolvendo um script simples, que se conecta a determinados computadores e executa, por meio de uma sshsessão, determinados comandos:

sshpass -p 'password' ssh $target_ip << EOF
    echo \$PATH
    # example
    echo \$HOSTNAME
    [...]
EOF

A operação está correta, mas me incomoda que a cada conexão ele mostre o sshbanner do servidor e interfira no restante do script stdout:

Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-81-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Wed Nov 23 11:58:14 CET 2022

  System load:  0.44               Processes:             131
  Usage of /:   9.2% of 108.79GB   Users logged in:       0
  Memory usage: 26%                IPv4 address for br0:  172.16.20.11
  Swap usage:   0%                 IPv4 address for br0:  10.130.1.1
  Temperature:  36.0 C             IPv4 address for tun0: 10.130.0.27

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge

241 updates can be installed immediately.
134 of these updates are security updates.
To see these additional updates run: apt list --upgradable


The list of available updates is more than a week old.
To check for new updates run: sudo apt update
New release '22.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Portanto, não quero que esse banner seja exibido e apenas as saídas dos comandos que executo dentro do arquivo EOF.

Caso seja relevante, a versão do SSH que estou usando é OpenSSH_9.1p1, OpenSSL 3.0.7 1 Nov 2022. No caso do servidor, é OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020.

Não quero retirar o banner do servidor, o que poderia ser feito nas sshdconfigurações. O que eu quero é que o cliente, no script, desabilite a impressão de banners.

No entanto, as opções de linha ssh que funcionaram para outras pessoas (estive aqui e aqui ) não funcionaram para mim:

ssh -o LogLevel=error $ip

Também:

ssh -q $ip

Como posso desabilitar isso no nível do cliente? não há opção ou parâmetro ssh que me permita fazer isso? e em caso de não, como posso redirecionar isso stdoutsem /dev/nulltocar nas saídas dos comandos que executo dentro do EOF?

ssh
  • 1 respostas
  • 43 Views
Martin Hope
Fco Javier Balón
Asked: 2022-11-08 01:57:54 +0800 CST

Não é possível iniciar o serviço displaylink para o adaptador HDMI

  • 6

Estou tentando fazer com que um adaptador USB 3.0 para HDMI funcione que suporte drivers de link de exibição no archlinuxservidor Xorg, fazendo:

  1. Eu instalei evdipara o módulo do kernel em desenvolvimento.
  2. Eu instalei o displaylinkdriver.
yay -S evdi displaylink
  1. eu habilitei displaylink.service.
  2. Usou o modesettingdriver com AccelMethod "none"e MatchDriver "evdi"(em /etc/X11/xorg.conf.d/20-evdi.conf):
Section "OutputClass"
    Identifier "DisplayLink"
    MatchDriver "evdi"
    Driver "modesetting"
    Option "AccelMethod" "none"
EndSection

Este é o procedimento oficial do arch-wiki .

No entanto, ao iniciar ou habilitar o displaylink.service, recebo o erro:

● displaylink.service - DisplayLink Manager Service
     Loaded: loaded (/usr/lib/systemd/system/displaylink.service; disabled; vendor preset: d>
     Active: activating (auto-restart) (Result: exit-code) since Tue 2021-10-05 12:06:37 EDT>
    Process: 24554 ExecStartPre=/sbin/modprobe evdi (code=exited, status=1/FAILURE)
        CPU: 2ms
lines 1-5/5 (END)

Verificando o journalctl, recebo:

The job identifier is 33183.
Oct 05 12:07:34 minnow modprobe[24572]: modprobe: FATAL: Module evdi not found in directory 

Oct 05 12:07:34 minnow systemd[1]: displaylink.service: Control process exited, code=exited,>
Subject: Unit process exited

Mas eu confirmei que evdiestá instalado corretamente.

arch-linux
  • 1 respostas
  • 18 Views
Martin Hope
Fco Javier Balón
Asked: 2022-10-28 00:46:22 +0800 CST

Como posso saber se a porta USB-C do meu laptop tem saída de vídeo (para adaptador USB-C - HDMI)?

  • 7

Eu tentei usar um hub com porta hdmi que se conecta à porta USB-C do meu computador, mas este não funciona.

Verificando outros tópicos semelhantes na Internet (e aqui), vejo que o problema provavelmente é que a porta USB-C em questão não suporta saída de vídeo (o próprio hub possui portas USB e elas funcionam corretamente).

Então, existe uma maneira de demonstrá-lo do meu PC para ficar calmo? Ou só posso verificar com a documentação do fabricante?

Para mais informações:

lsusb -tantes da fixação do cubo:

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 7: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 2, If 2, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 2, If 3, Class=Video, Driver=uvcvideo, 480M
    |__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M

lsusb -tapós a fixação do cubo:

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
    |__ Port 3: Dev 8, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 7: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 2, If 2, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 2, If 3, Class=Video, Driver=uvcvideo, 480M
    |__ Port 8: Dev 41, If 0, Class=Hub, Driver=hub/5p, 480M
    |__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M

xrandersaída antes e depois da fixação do hub:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 310mm x 170m
   1920x1080     60.01*+  59.93
   1680x1050     59.95    59.88
   1400x1050     59.98
   1600x900      60.00    59.95    59.82
   1280x1024     60.02
   1400x900      59.96    59.88
   1280x960      60.00
   1368x768      60.00    59.88    59.85
   1280x800      59.81    59.91
   1280x720      59.86    60.00    59.74
   1024x768      60.00
   1024x576      60.00    59.90    59.82
   960x540       60.00    59.63    59.82
   800x600       60.32    56.25
   864x486       60.00    59.92    59.57
   640x480       59.94
   720x405       59.51    60.00    58.99
   640x360       59.84    59.32    60.00
HDMI1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

E xrandrapós o anexo do monitor da porta HDMI:

Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 310mm x 170mm
   1920x1080     60.01*+  59.93
   1680x1050     59.95    59.88
   1400x1050     59.98
   1600x900      60.00    59.95    59.82
   1280x1024     60.02
   1400x900      59.96    59.88
   1280x960      60.00
   1368x768      60.00    59.88    59.85
   1280x800      59.81    59.91
   1280x720      59.86    60.00    59.74
   1024x768      60.00
   1024x576      60.00    59.90    59.82
   960x540       60.00    59.63    59.82
   800x600       60.32    56.25
   864x486       60.00    59.92    59.57
   640x480       59.94
   720x405       59.51    60.00    58.99
   640x360       59.84    59.32    60.00
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     60.00*+  50.00    59.94
   1680x1050     59.88
   1600x900      60.00
   1280x1024     60.02
   1440x900      59.90
   1280x800      59.91
   1280x720      60.00    50.00    59.94
   1024x768      60.00
   800x600       60.32
   720x576       50.00
   720x480       60.00    59.94
   640x480       60.00    59.94
   720x400       70.08
VIRTUAL1 disconnected (normal left inverted right x axis y axis) 
hardware
  • 1 respostas
  • 21 Views
Martin Hope
balon
Asked: 2021-11-11 01:11:35 +0800 CST

Libere espaço mysql em PC com pouco disco

  • 0

Eu tenho um PC com um pequeno disco:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       3.5G  3.1G  249M  93% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           463M     0  463M   0% /dev/shm
tmpfs           463M   36M  428M   8% /run
tmpfs           5.0M  8.0K  5.0M   1% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M   25M   38M  40% /boot
tmpfs            64M  140K   64M   1% /mnt/ramdisk

Eu tenho um banco de dados simples, mas uma das tabelas tem mais de 5 milhões de linhas, ocupando muito em um registro tão pequeno:

# ls -lh /var/lib/mysql/datalogger/
total 1.1G
...
-rw-rw---- 1 mysql mysql 1.1G Nov 10 09:56 avg_values.ibd
...

Meu objetivo, feito em outros computadores semelhantes sem tanto espaço ocupado (cerca de metade nessa tabela) era executar uma consulta que excluísse dados com mais de 6 meses. A consulta é irrelevante para o caso. após a consulta, executando optimize NO_WRITE_TO_BINLOG table avg_values;liberar ibdespaço.

O problema com o computador em questão, é que -como acredito- o espaço disponível é muito limitado, você não pode realizar consultas em uma tabela tão grande (por cache, eu entendo), causando instabilidade nas comunicações, mesmo quando a consulta um limite:

MariaDB [datalogger]> select * from avg_values limit 10;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    5
Current database: datalogger

ERROR 2013 (HY000): Lost connection to MySQL server during query

Com outras tabelas menores, geralmente não há problemas (embora também indique erro):

MariaDB [datalogger]> select * from raw_values;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    5
Current database: datalogger

+----+---------------------+-------------------+------+-------+
| id | timestamp           | channel           | raw  | value |
+----+---------------------+-------------------+------+-------+
|  1 | 2021-11-10 09:46:51 | AI1               |    1 | 0.011 |
|  2 | 2021-11-10 09:46:51 | AI2               |    1 | 0.011 |
|  3 | 2021-11-10 09:46:51 | AI3               |    2 | 0.022 |
|  4 | 2021-11-10 09:46:51 | AI4               |    2 | 0.022 |
|  5 | 2021-11-10 09:46:51 | pyr1_sensor1_data |  113 |   113 |
|  6 | 2021-11-10 09:46:51 | pyr1_body_temp    |   42 |    42 |
|  7 | 2021-11-10 09:46:51 | pyr2_sensor1_data | NULL |  NULL |
|  8 | 2021-11-10 09:46:51 | pyr2_body_temp    | NULL |  NULL |
|  9 | 2021-11-10 09:46:46 | AI1               |    1 | 0.011 |
| 10 | 2021-11-10 09:46:46 | AI2               |    1 | 0.011 |
| 11 | 2021-11-10 09:46:46 | AI3               |    2 | 0.022 |
| 12 | 2021-11-10 09:46:46 | AI4               |    2 | 0.022 |
| 13 | 2021-11-10 09:46:46 | pyr1_sensor1_data |  115 |   115 |
| 14 | 2021-11-10 09:46:46 | pyr1_body_temp    |   42 |    42 |
| 15 | 2021-11-10 09:46:46 | pyr2_sensor1_data | NULL |  NULL |
| 16 | 2021-11-10 09:46:46 | pyr2_body_temp    | NULL |  NULL |
| 17 | 2021-11-10 09:46:52 | AI1               |    1 | 0.011 |
| 18 | 2021-11-10 09:46:52 | AI2               |    1 | 0.011 |
| 19 | 2021-11-10 09:46:52 | AI3               |    2 | 0.022 |
| 20 | 2021-11-10 09:46:52 | AI4               |    2 | 0.022 |
| 21 | 2021-11-10 09:46:52 | pyr1_sensor1_data |  112 |   112 |
| 22 | 2021-11-10 09:46:52 | pyr1_body_temp    |   42 |    42 |
| 23 | 2021-11-10 09:46:52 | pyr2_sensor1_data | NULL |  NULL |
| 24 | 2021-11-10 09:46:52 | pyr2_body_temp    | NULL |  NULL |
+----+---------------------+-------------------+------+-------+
24 rows in set (0.02 sec)

Existe alguma maneira de executar essas consultas, especialmente com esse pequeno disco, para liberar espaço?

mysql disk
  • 1 respostas
  • 51 Views
Martin Hope
balon
Asked: 2020-03-11 01:42:40 +0800 CST

inicie um executável dotnet core através do daemon systemd no caminho relativo

  • 0

Desenvolvi e publiquei uma aplicação web dotnet corepara linux arm machine. Para fazer isso, o comando foi lançado:

dotnet publish --runtime linux-arm -p:PublishSingleFile=true

E como resultado dá o diretório:

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       10/03/2020      8:56                wwwroot
-a----       09/03/2020     10:54            162 appsettings.Development.json
-a----       09/03/2020     10:54            192 appsettings.json
-a----       10/03/2020      8:56      108097487 coremonitor
-a----       09/03/2020     12:59           7248 coremonitor.pdb
-a----       10/03/2020      8:56            474 web.config

Onde coremonitorestá o executável. Esses dados são enviados ao servidor e armazenados no caminho /root/datalogger/linux-arm/. Em seguida, criamos o daemon systemd para iniciá-lo:

[Unit]
Description=Data Logger Monitor Daemon

[Service]
ExecStart=./coremonitor
WorkingDirectory=/root/dataloggermonitor/linux-arm
User=dotnetuser
Group=dotnetuser
Restart=on-failure
SyslogIdentifier=DataLoggerMonitor-Service
PrivateTmp=true

[Install]
WantedBy=multi-user.target

Depois de reiniciar, recebo o seguinte log do systemd ( systemctl status dataloggermonitor):

● dataloggermonitor.service - Data Logger Monitor Daemon
   Loaded: error (Reason: Invalid argument)
   Active: inactive (dead)
systemd daemon
  • 1 respostas
  • 271 Views
Martin Hope
balon
Asked: 2019-11-27 07:07:03 +0800 CST

Problemas com o apt no Raspbian onde o conteúdo /var foi removido ou corrompido

  • 3

Aparentemente em um servidor de produção houve algum problema e alguém apagou o conteúdo da /varpasta.

Isso tem causado vários erros que venho resolvendo com vários serviços como servidor web.

O problema que estou tendo com apto , problema que não me permite atualizar, remover ou instalar pacotes.

por exemplo eu quero reinstalar o servidor de banco de dados mariadb-server, mas ele me diz que o pacote não está instalado no sistema (isso é falso, eu instalei pessoalmente):

root# apt remove mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mariadb-server' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 chkconfig : Depends: perl but it is not going to be installed
             Recommends: insserv but it is not going to be installed
 libboost-chrono1.50.0 : Depends: libgcc1 (>= 1:4.4.0) but it is not going to be installed
                         Depends: libstdc++6 (>= 4.4.0) but it is not going to be installed
 libboost-system1.50.0 : Depends: libgcc1 (>= 1:4.4.0) but it is not going to be installed
                         Depends: libstdc++6 (>= 4.4.0) but it is not going to be installed
 libboost-thread1.50.0 : Depends: libgcc1 (>= 1:4.4.0) but it is not going to be installed
                         Depends: libstdc++6 (>= 4.6) but it is not going to be installed
 libc6 : Depends: libgcc1 but it is not going to be installed
 libprotobuf-lite7 : Depends: libgcc1 (>= 1:4.4.0) but it is not going to be installed
                     Depends: libstdc++6 (>= 4.4.0) but it is not going to be installed
                     Depends: zlib1g (>= 1:1.1.4) but it is not going to be installed
 oracle-java8-jdk : Depends: libasound2 (>= 1.0.16)
                    Depends: libgcc1 (>= 1:4.4.0) but it is not going to be installed
                    Depends: libx11-6 but it is not going to be installed
                    Depends: libxext6 but it is not going to be installed
                    Depends: libxi6 but it is not going to be installed
                    Depends: libxrender1 but it is not going to be installed
                    Depends: libxtst6 but it is not going to be installed
                    Recommends: netbase but it is not going to be installed
 redis-server : Depends: init-system-helpers (>= 1.18~) but it is not going to be installed
                Depends: libjemalloc1 (>= 2.1.1) but it is not going to be installed
                Depends: adduser but it is not going to be installed
 redis-tools : Depends: libjemalloc1 (>= 2.1.1) but it is not going to be installed
 watchdog : Depends: debconf (>= 0.5) but it is not going to be installed or
                     debconf-2.0
            Depends: init-system-helpers (>= 1.18~) but it is not going to be installed
            Depends: makedev (>= 2.3.1-24) but it is not going to be installed or
                     udev but it is not going to be installed
            Depends: lsb-base (>= 3.2-14) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

se eu iniciar o comando que me diz para resolver dependências não atendidas:

root# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  adduser apt apt-utils base-passwd ca-certificates coreutils debconf debconf-i18n debianutils dpkg e2fslibs e2fsprogs gnupg gnupg-curl gpgv ifupdown init-system-helpers initscripts insserv iproute2 isc-dhcp-client isc-dhcp-common
  krb5-locales libacl1 libalgorithm-c3-perl libapt-inst1.5 libapt-pkg4.12 libarchive-extract-perl libasound2 libasound2-data libatm1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libcgi-fast-perl libcgi-pm-perl
  libclass-c3-perl libclass-c3-xs-perl libcomerr2 libcpan-meta-perl libcurl3-gnutls libdata-optlist-perl libdata-section-perl libdb5.3 libdebconfclient0 libdns-export100 libfcgi-perl libffi6 libgcc1 libgcrypt20 libgdbm3 libgmp10
  libgnutls-deb0-28 libgpg-error0 libgpm2 libgssapi-krb5-2 libhogweed2 libidn11 libirs-export91 libisc-export95 libisccfg-export90 libjemalloc1 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblocale-gettext-perl
  liblog-message-perl liblog-message-simple-perl liblzma5 libmodule-build-perl libmodule-pluggable-perl libmodule-signature-perl libmount1 libmro-compat-perl libncurses5 libnettle4 libp11-kit0 libpackage-constants-perl libpam-modules
  libpam-modules-bin libpam0g libparams-util-perl libpcre3 libpng12-0 libpod-latex-perl libpod-readme-perl libreadline6 libregexp-common-perl librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libselinux1 libsemanage-common
  libsemanage1 libsepol1 libslang2 libsmartcols1 libsoftware-license-perl libss2 libssh2-1 libssl1.0.0 libstdc++6 libsub-exporter-perl libsub-install-perl libsystemd0 libtasn1-6 libterm-ui-perl libtext-charwidth-perl libtext-iconv-perl
  libtext-soundex-perl libtext-template-perl libtext-wrapi18n-perl libtinfo5 libusb-0.1-4 libustr-1.0-1 libuuid1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxi6 libxrender1 libxtables10 libxtst6 lsb-base makedev netbase
  openssl passwd perl perl-base perl-modules psmisc raspbian-archive-keyring readline-common redis-server redis-tools rename sensible-utils startpar sysv-rc sysvinit-utils tar tzdata util-linux uuid-runtime x11-common zlib1g
Suggested packages:
  aptitude synaptic wajig dpkg-dev apt-doc python-apt debconf-doc debconf-utils whiptail dialog gnome-utils libterm-readline-gnu-perl libgtk2-perl libnet-ldap-perl libqtgui4-perl libqtcore4-perl gpart parted fuse2fs e2fsck-static
  gnupg-doc libpcsclite1 parcimonie xloadimage imagemagick eog ppp rdnssd net-tools bootchart2 iproute2-doc resolvconf avahi-autoipd libasound2-plugins alsa-utils rng-tools gnutls-bin gpm krb5-doc krb5-user libpam-doc
  libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal perl-doc make libb-lint-perl libcpanplus-dist-build-perl libcpanplus-perl libfile-checktree-perl
  libobject-accessor-perl readline-doc bum bootlogd sash bzip2 ncompress xz-utils tar-scripts dosfstools kbd console-tools util-linux-locales
Recommended packages:
  libarchive-tar-perl
The following NEW packages will be installed:
  adduser apt apt-utils base-passwd ca-certificates coreutils debconf debconf-i18n debianutils dpkg e2fslibs e2fsprogs gnupg gnupg-curl gpgv ifupdown init-system-helpers initscripts insserv iproute2 isc-dhcp-client isc-dhcp-common
  krb5-locales libacl1 libalgorithm-c3-perl libapt-inst1.5 libapt-pkg4.12 libarchive-extract-perl libasound2 libasound2-data libatm1 libattr1 libaudit-common libaudit1 libblkid1 libbz2-1.0 libcgi-fast-perl libcgi-pm-perl
  libclass-c3-perl libclass-c3-xs-perl libcomerr2 libcpan-meta-perl libcurl3-gnutls libdata-optlist-perl libdata-section-perl libdb5.3 libdebconfclient0 libdns-export100 libfcgi-perl libffi6 libgcc1 libgcrypt20 libgdbm3 libgmp10
  libgnutls-deb0-28 libgpg-error0 libgpm2 libgssapi-krb5-2 libhogweed2 libidn11 libirs-export91 libisc-export95 libisccfg-export90 libjemalloc1 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblocale-gettext-perl
  liblog-message-perl liblog-message-simple-perl liblzma5 libmodule-build-perl libmodule-pluggable-perl libmodule-signature-perl libmount1 libmro-compat-perl libncurses5 libnettle4 libp11-kit0 libpackage-constants-perl libpam-modules
  libpam-modules-bin libpam0g libparams-util-perl libpcre3 libpng12-0 libpod-latex-perl libpod-readme-perl libreadline6 libregexp-common-perl librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libselinux1 libsemanage-common
  libsemanage1 libsepol1 libslang2 libsmartcols1 libsoftware-license-perl libss2 libssh2-1 libssl1.0.0 libstdc++6 libsub-exporter-perl libsub-install-perl libsystemd0 libtasn1-6 libterm-ui-perl libtext-charwidth-perl libtext-iconv-perl
  libtext-soundex-perl libtext-template-perl libtext-wrapi18n-perl libtinfo5 libusb-0.1-4 libustr-1.0-1 libuuid1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxi6 libxrender1 libxtables10 libxtst6 lsb-base makedev netbase
  openssl passwd perl perl-base perl-modules psmisc raspbian-archive-keyring readline-common rename sensible-utils startpar sysv-rc sysvinit-utils tar tzdata util-linux uuid-runtime x11-common zlib1g
The following packages will be upgraded:
  redis-server redis-tools
2 upgraded, 153 newly installed, 0 to remove and 3 not upgraded.
11 not fully installed or removed.
Need to get 37.1 MB of archives.
After this operation, 120 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.raspberrypi.org/debian/ jessie/main libasound2-data all 1.0.28-1+rpi3 [65.3 kB]
Get:2 http://archive.raspberrypi.org/debian/ jessie/main libasound2 armhf 1.0.28-1+rpi3 [320 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgcc1 armhf 1:4.9.2-10+deb8u2 [39.5 kB]
Get:4 http://archive.raspberrypi.org/debian/ jessie/main x11-common all 1:7.7+16 [251 kB]
[...]
Get:152 http://mirrordirector.raspbian.org/raspbian/ jessie/main libterm-ui-perl all 0.42-1 [19.1 kB]
Get:153 http://mirrordirector.raspbian.org/raspbian/ jessie/main libtext-soundex-perl armhf 3.4-1+b2 [13.3 kB]
Get:154 http://mirrordirector.raspbian.org/raspbian/ jessie/main psmisc armhf 22.21-2 [117 kB]
Get:155 http://mirrordirector.raspbian.org/raspbian/ jessie/main rename all 0.20-3 [12.4 kB]
Fetched 37.1 MB in 2min 29s (249 kB/s)
Reading changelogs... Done
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 19%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 38%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 58%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 77%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 96%E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
Extracting templates from packages: 100%
dpkg: regarding .../libgcc1_1%3a4.9.2-10+deb8u2_armhf.deb containing libgcc1:armhf, pre-dependency problem:
 libgcc1 pre-depends on multiarch-support
  multiarch-support is unpacked, but has never been configured.

dpkg: error processing archive /var/cache/apt/archives/libgcc1_1%3a4.9.2-10+deb8u2_armhf.deb (--unpack):
 pre-dependency problem - not installing libgcc1:armhf
Errors were encountered while processing:
 /var/cache/apt/archives/libgcc1_1%3a4.9.2-10+deb8u2_armhf.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

Aqui está a prova de que o mariadb-server está instalado (o erro é devido à remoção de /var, então quero reinstalá-lo):

root# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused")

Como você pode ver, ambos apte mariadb-serverme lançam erros com conteúdo ausente no /vardiretório. Então entrei em um loop onde não sei como proceder para resolver esse problema.

raspbian apt
  • 1 respostas
  • 245 Views
Martin Hope
balon
Asked: 2019-11-21 07:19:02 +0800 CST

Como demonstro o tipo de compactação do kernel na prática?

  • 11

Eu tenho que descobrir o tipo de compressão do kernel linux do meu sistema arch linux, mas não consigo encontrar uma maneira de obtê-lo mais do que a teoria: agora bzip2 (bz), anteriormente gzip (z).

No meu computador eu executo o comando:

$ file /boot/vmlinuz-linux
/boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 5.3.11-arch1-1 (linux@archlinux) #1 SMP PREEMPT Tue, 12 Nov 2019 22:19:48 +0000, RO-rootFS, swap_dev 0x5, Normal VGA

Olhando para a teoria, vejo que bzImagedeve ser compactado por gzip (z), mas não consigo provar:

O bzImage foi compactado usando gzip até o Linux 2.6.30 que introduziu mais algoritmos. Embora haja o equívoco popular de que o prefixo bz significa que a compactação bzip2 é usada (o pacote bzip2 geralmente é distribuído com ferramentas prefixadas com bz, como bzless, bzcat etc.), esse não é o caso.

Existe alguma maneira de provar isso na minha própria máquina? ou a própria teoria, neste caso, é "empírica"?

linux linux-kernel
  • 3 respostas
  • 8030 Views
Martin Hope
balon
Asked: 2019-11-15 01:19:29 +0800 CST

Script Bash que mostra a alteração dos valores em tempo real dos comandos

  • 9

Em uma máquina Linux tenho uma série de comandos que oferecem valores numéricos do estado de diferentes sensores.

A chamada desses comandos é algo semelhante ao seguinte:

$ command1
5647
$ command2
76
$ command3
8754

Esses valores mudam em tempo real, e toda vez que quero verificar o status de um deles, tenho que reiniciar o comando... Isso não me faz bem, pois preciso das duas mãos para manipular o hardware.

Meu objetivo é fazer um Bash Script simples que chame esses comandos e mantenha o valor atualizado (em tempo real de forma assíncrona ou atualizando o valor a cada x segundos) assim:

$ ./myScript.sh
command1: x
command2: y
command3: z
command4: v

Onde x, y, ze vsão os valores variáveis.

Bash permite isso de forma simples e eficiente? ou devo optar por fazê-lo em outra linguagem, como Python?

ATUALIZAÇÃO com mais informações:

Meu script atual é:

#!/bin/bash
echo "Célula calibrada: " $(npe ?AI1)
echo "Anemómetro: " $(npe ?AI2)
echo "Célula temperatura: " $(npe ?AI3)
echo "Célula temperatura: " $(npe ?AI4)

npesendo um comando de exemplo que retorna o valor numérico. Espero uma saída como esta:

insira a descrição da imagem aqui

Essa saída eu recebo com o comando watch -n x ./myScript.sh, onde xé o valor de atualização de segundos. Se eu editar meu script assim:

#!/bin/bash
while sleep 1; do
   clear; # added to keep the information in the same line 
   echo "Célula calibrada: " $(npe ?AI1);
   echo "Anemómetro: " $(npe ?AI2);
   echo "Célula temperatura: " $(npe ?AI3);
   echo "Célula temperatura: " $(npe ?AI4);
done

Eu recebo minha saída com uma cintilação irritante:

insira a descrição da imagem aqui

linux
  • 10 respostas
  • 8236 Views
Martin Hope
balon
Asked: 2019-11-14 06:35:06 +0800 CST

Crie vários arquivos com expansão de chaves combinando letras e números

  • 1

Estou tentando criar uma série de arquivos com expansões de chave. Eu quero criar os arquivos fileA1com fileZ100todas as combinações possíveis (algo como touch file[A..Z][1..100]).

Se eu executar o comando touch $(printf "file%d " {1..100})a saída está ok:

file1    file15  file21  file28  file34  file40  file47  file53  file6   file66  file72  file79  file85  file91  file98
file10   file16  file22  file29  file35  file41  file48  file54  file60  file67  file73  file8   file86  file92  file99
file100  file17  file23  file3   file36  file42  file49  file55  file61  file68  file74  file80  file87  file93
file11   file18  file24  file30  file37  file43  file5   file56  file62  file69  file75  file81  file88  file94
file12   file19  file25  file31  file38  file44  file50  file57  file63  file7   file76  file82  file89  file95
file13   file2   file26  file32  file39  file45  file51  file58  file64  file70  file77  file83  file9   file96
file14   file20  file27  file33  file4   file46  file52  file59  file65  file71  file78  file84  file90  file97

O mesmo se eu executar touch $(printf "file%c " {A..Z}):

fileA  fileC  fileE  fileG  fileI  fileK  fileM  fileO  fileQ  fileS  fileU  fileW  fileY
fileB  fileD  fileF  fileH  fileJ  fileL  fileN  fileP  fileR  fileT  fileV  fileX  fileZ

Estou tentando combiná-los touch $(printf "file%c%d " {A..Z}{1..100}), mas a saída é:

[...]
-bash: printf: Y2: invalid number
-bash: printf: Y4: invalid number
-bash: printf: Y6: invalid number
-bash: printf: Y8: invalid number
-bash: printf: Y10: invalid number
-bash: printf: Y12: invalid number
-bash: printf: Y14: invalid number
-bash: printf: Y16: invalid number
-bash: printf: Y18: invalid number
-bash: printf: Y20: invalid number
-bash: printf: Y22: invalid number
-bash: printf: Y24: invalid number
-bash: printf: Y26: invalid number
-bash: printf: Y28: invalid number
-bash: printf: Y30: invalid number
-bash: printf: Y32: invalid number
-bash: printf: Y34: invalid number
-bash: printf: Y36: invalid number
-bash: printf: Y38: invalid number
-bash: printf: Y40: invalid number
-bash: printf: Y42: invalid number
-bash: printf: Y44: invalid number
-bash: printf: Y46: invalid number
-bash: printf: Y48: invalid number
-bash: printf: Y50: invalid number
-bash: printf: Y52: invalid number
-bash: printf: Y54: invalid number
-bash: printf: Y56: invalid number
-bash: printf: Y58: invalid number
-bash: printf: Y60: invalid number
-bash: printf: Y62: invalid number
-bash: printf: Y64: invalid number
-bash: printf: Y66: invalid number
-bash: printf: Y68: invalid number
-bash: printf: Y70: invalid number
-bash: printf: Y72: invalid number
-bash: printf: Y74: invalid number
-bash: printf: Y76: invalid number
-bash: printf: Y78: invalid number
-bash: printf: Y80: invalid number
-bash: printf: Y82: invalid number
-bash: printf: Y84: invalid number
-bash: printf: Y86: invalid number
-bash: printf: Y88: invalid number
-bash: printf: Y90: invalid number
-bash: printf: Y92: invalid number
-bash: printf: Y94: invalid number
-bash: printf: Y96: invalid number
-bash: printf: Y98: invalid number
-bash: printf: Y100: invalid number
-bash: printf: Z2: invalid number
-bash: printf: Z4: invalid number
-bash: printf: Z6: invalid number
-bash: printf: Z8: invalid number
-bash: printf: Z10: invalid number
-bash: printf: Z12: invalid number
-bash: printf: Z14: invalid number
-bash: printf: Z16: invalid number
-bash: printf: Z18: invalid number
-bash: printf: Z20: invalid number
-bash: printf: Z22: invalid number
-bash: printf: Z24: invalid number
-bash: printf: Z26: invalid number
-bash: printf: Z28: invalid number
-bash: printf: Z30: invalid number
-bash: printf: Z32: invalid number
-bash: printf: Z34: invalid number
-bash: printf: Z36: invalid number
-bash: printf: Z38: invalid number
-bash: printf: Z40: invalid number
-bash: printf: Z42: invalid number
-bash: printf: Z44: invalid number
-bash: printf: Z46: invalid number
-bash: printf: Z48: invalid number
-bash: printf: Z50: invalid number
-bash: printf: Z52: invalid number
-bash: printf: Z54: invalid number
-bash: printf: Z56: invalid number
-bash: printf: Z58: invalid number
-bash: printf: Z60: invalid number
-bash: printf: Z62: invalid number
-bash: printf: Z64: invalid number
-bash: printf: Z66: invalid number
-bash: printf: Z68: invalid number
-bash: printf: Z70: invalid number
-bash: printf: Z72: invalid number
-bash: printf: Z74: invalid number
-bash: printf: Z76: invalid number
-bash: printf: Z78: invalid number
-bash: printf: Z80: invalid number
-bash: printf: Z82: invalid number
-bash: printf: Z84: invalid number
-bash: printf: Z86: invalid number
-bash: printf: Z88: invalid number
-bash: printf: Z90: invalid number
-bash: printf: Z92: invalid number
-bash: printf: Z94: invalid number
-bash: printf: Z96: invalid number
-bash: printf: Z98: invalid number
-bash: printf: Z100: invalid number

Então... qual é a expressão regular correta? Devo usar tubos?

bash
  • 2 respostas
  • 222 Views
Martin Hope
balon
Asked: 2019-10-31 14:46:11 +0800 CST

Existe alguma maneira de colorir palavras concretas no bash?

  • 1

Gostaria de saber se existe alguma forma de colorir, .bashrcpor exemplo, de acordo com quais palavras ou em quais situações.

Eu me explico: quero colorir os endereços IP que aparecem no console, também gostaria de colorir todas as palavras de erro em vermelho, e também o primeiro argumento de cada comando (o nome do próprio comando).

linux
  • 1 respostas
  • 72 Views
Martin Hope
balon
Asked: 2019-10-25 03:50:07 +0800 CST

Caminho e compactação do kernel do Linux

  • 0

Estou tentando encontrar o caminho do kernel do Linux para descobrir que tipo de compactação ele usa em um Raspberry Pi industrial.

Estou executando o comando cat /proc/cmdlinee obtenho a saída:

dwc_otg.lpm_enable=0 smsc95xx.macaddr=18:83:C4:04:49:C5 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd elevator=deadline bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080

O conteúdo de /booté (a imagem do kernel do Linux deve estar aqui):

total 24948
-rwxr-xr-x 1 root root   15747 Jul 31  2018 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root    3667 Jul 31  2018 bcm2710-rpi-cm3.dts
-rwxr-xr-x 1 root root   50192 Feb 10  2017 bootcode.bin
-rwxr-xr-x 1 root root     391 Oct  7  2019 boot.scr
-rwxr-xr-x 1 root root     136 Jan  1  1980 cmdline.txt
-rwxr-xr-x 1 root root     103 Jul 31  2018 config.txt
-rwxr-xr-x 1 root root       4 Oct  7  2019 console_status
-rwxr-xr-x 1 root root   18693 Aug 21  2015 COPYING.linux
-rwxr-xr-x 1 root root   39946 Jul 31  2018 dt-blob.bin
-rwxr-xr-x 1 root root   62963 Jul 31  2018 dt-blob.dts
-rwxr-xr-x 1 root root    2527 Nov 25  2016 fixup_cd.dat
-rwxr-xr-x 1 root root    6617 Feb 10  2017 fixup.dat
-rwxr-xr-x 1 root root    9751 Nov 25  2016 fixup_db.dat
-rwxr-xr-x 1 root root    9749 Nov 25  2016 fixup_x.dat
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0000.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0001.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0002.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0003.REC
-rwxr-xr-x 1 root root     145 Nov 25  2016 issue.txt
-rwxr-xr-x 1 root root 4228952 Feb 10  2017 kernel7.img
-rwxr-xr-x 1 root root 4128712 Nov 25  2016 kernel.img
-rwxr-xr-x 1 root root    1494 Nov 18  2015 LICENCE.broadcom
-rwxr-xr-x 1 root root   18974 Nov 25  2016 LICENSE.oracle
drwxr-xr-x 2 root root    8192 Jul 31  2018 overlays
-rwxr-xr-x 1 root root  633636 Nov 25  2016 start_cd.elf
-rwxr-xr-x 1 root root 4954692 Nov 25  2016 start_db.elf
-rwxr-xr-x 1 root root 2830532 Feb 10  2017 start.elf
-rwxr-xr-x 1 root root 3904260 Nov 25  2016 start_x.elf
drwxr-xr-x 2 root root     512 Feb 10  2017 System Volume Information
-rwxr-xr-x 1 root root     383 Jan  1 01:00 tb_config
-rwxr-xr-x 1 root root   35700 Jan  1 01:00 tb_config_tmp
-rwxr-xr-x 1 root root     391 Jul 31  2018 tmp_boot.cmd_servic_off
-rwxr-xr-x 1 root root     438 Jul 31  2018 tmp_boot.cmd_servic_on
-rwxr-xr-x 1 root root  340632 Feb 10  2017 u-boot.bin
-rwxr-xr-x 1 root root 4228672 Feb 10  2017 zImage

Mas não vejo relação entre eles... Alguém pode me ajudar a identificar a imagem e explicar a saída do comando cat /proc/cmdline?

ATUALIZAR

No meu laptop com Arch Linux a relação é clara:

Entrada:cat/proc/cmdline

Resultado:BOOT_IMAGE=/vmlinuz-linux root=UUID=[...] rw quiet

E em /booteu posso encontrar:

-rw-r--r-- 1 root root 6289792 oct 18 02:15 vmlinuz-linux

kernel
  • 1 respostas
  • 144 Views
Martin Hope
balon
Asked: 2019-10-09 08:33:43 +0800 CST

Erro ao instalar php-db no Debian 10 Buster

  • 0

Eu tentei instalar o php-db no Debian 10 Buster, que é uma dependência exigida pelo PandoraFMS Console (estou instalando), mas não está funcionando para mim.

quando tento instalar falto a dependência:

[...]
dpkg: dependency problems prevent configuration of pandorafms-console:
   pandorafms-console depends on php-db; however:
      Package php-db is not installed.

E se eu tentar instalar o php-db manualmente:

# apt install php-db
[...]
Package php-db is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php-db' has no installation candidate

Em packages.debian.org eu posso pesquisar o pacote e descobri que:

Pacote php-db

+ jessie (oldoldstable) (php): PHP PEAR Database Abstraction Layer
  1.7.14-3: all
+ stretch (oldstable) (php): Database Abstraction Layer
  1.9.2-1: all
+ sid (unstable) (php): Database Abstraction Layer
  1.9.2-2: all

Para mais informações, o conteúdo de /etc/apt/sources.list é (comentários óbvios):

deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main

deb http://security.debian.org/ buster/updates main
deb-src http://security.debian.org/ buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main

deb http://deb.debian.org/debian buster-backports main
deb-src http://deb.debian.org/debian buster-backports main

O diretório /etc/apt/sources.list.d/ está vazio.

O que eu posso fazer?

debian
  • 2 respostas
  • 1369 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Possível firmware ausente /lib/firmware/i915/* para o módulo i915

    • 3 respostas
  • Marko Smith

    Falha ao buscar o repositório de backports jessie

    • 4 respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    user12345 Falha ao buscar o repositório de backports jessie 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl Por que a maioria dos exemplos do systemd contém WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve