AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1806

jcubic's questions

Martin Hope
jcubic
Asked: 2022-11-22 01:56:49 +0800 CST

在 Fedora 37 上安装 claws-mail 时缺少 EXTERN.h 文件

  • 5

我试图编译 Claws-mail 但出现错误:

perl_plugin.c:54:10: fatal error: EXTERN.h: No such file or directory
   54 | #include <EXTERN.h>

我已经安装了 perl-core perl-devel 已经安装好了。

我可以运行 perl -v

# perl -v | grep built
This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-linux-thread-multi

但问题是没有/usr/lib/perl5目录。我发现文件在/usr/lib64/perl/CORE/但我不知道如何编译应用程序,Claws-mail 的作者说我的系统有问题,他帮不了我。

我试过添加

export INCLUDE="/usr/lib64/perl/CORE/"

但错误仍然存​​在。我无法编译应用程序。

奇怪的是包文件列表显示路径不应该/usr/lib/是/usr/lib64.

我的系统是从 Fedora 35 升级而来的。

fedora
  • 1 个回答
  • 17 Views
Martin Hope
jcubic
Asked: 2022-11-09 12:14:28 +0800 CST

如何在 Fedora 上从源代码安装 ttyd?

  • 5

我正在尝试在 Fedora 上编译ttyd需要的内容。libwebsockets我的系统有一个过时的版本,ttyd我需要一个更新的版本来运行vhs tool。

这两个项目都使用 CMake,我能够编译和安装两者。

当我ttyd从构建目录运行时,它工作正常。但是当我从其他地方运行时,我遇到了这个错误:

ttyd: error while loading shared libraries: libwebsockets.so.19: cannot open shared object file: No such file or directory

当我将构建目录添加到我的PATH变量中时,我可以使用ttyd,vhs但我希望正确安装ttyd它。我做错了什么?

请注意,我已经安装ttyd然后libwebsockets删除它们。

我可能会关心共享库的符号链接,但这并不是问题的实际解决方案。如果我从源代码安装两者,为什么缺少共享库?

编辑:

我以相同的方式安装了这两个软件包:

mkdir build
cd build
cmake ..
make
sudo make install

共享库安装在/usr/local/lib/

fedora
  • 1 个回答
  • 18 Views
Martin Hope
jcubic
Asked: 2022-04-11 10:28:35 +0800 CST

为什么管道不适用于 upower -e

  • 0

我刚刚找到了这个命令:

upower -e

显示可用于upower -i显示插入设备状态的文件列表。

所以我的第一次尝试是使用:

upower -e | xargs upower -i

但它不起作用。所以我试过:

$ upower -e | xargs echo
/org/freedesktop/UPower/devices/line_power_AC /org/freedesktop/UPower/devices/battery_BAT0 /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001 /org/freedesktop/UPower/devices/DisplayDevice

并将所有文件显示在单行中。所以我用过:

$ upower -e | xargs -0 echo
/org/freedesktop/UPower/devices/line_power_AC
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
/org/freedesktop/UPower/devices/DisplayDevice

它可以工作,但显示一个空行,但这不起作用:

$ upower -e | xargs -0 upower -i
failed to set path: Object path invalid: /org/freedesktop/UPower/devices/line_power_AC
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
/org/freedesktop/UPower/devices/DisplayDevice

为什么upower -e | xargs upower -i不起作用?我在 Fedora 上使用 Bash。

我在这里缺少什么吗?

编辑:

这似乎有效:

upower -e | xargs -I {} upower -i "{}"

但我想知道:如果文件名没有空格,为什么需要引号?

bash pipe
  • 1 个回答
  • 48 Views
Martin Hope
jcubic
Asked: 2021-12-17 05:57:12 +0800 CST

将对话框命令中的 ANSI 代码保存到文件中

  • 0

是否可以获取对话框命令,例如:

dialog --title "HELLO" --yesno "Are you sure?" 6 30

放入包含所有 ANSI 转义码的文件中,以便稍后打印?

您可以将对话框重定向到文件中以获取输出,但您无法与页面交互,因此可能很难退出。

bash escape-characters
  • 1 个回答
  • 117 Views
Martin Hope
jcubic
Asked: 2019-12-29 11:04:57 +0800 CST

ANSI 转义 0x1b[0A 和其他 0 值代码应该做什么?

  • 2

我正在为 jQuery 终端编写 ANSI 格式代码。它几乎可以工作,但我有一个问题与应该移动光标的 0A ansi 代码有关(还有其他 0 光标代码:BCDEF)

我已经使用ervy 库进行了测试,如果我\x1b\[0[A-D]在输出到终端之前从字符串中删除它会有所不同。

我不确定如果我正确处理 ANSI 转义,我将在每行之前将输出分成几行,我增加 y 位置并将 x 设置为 0,当有光标 ANSI 转义码时,我移动光标。我正在使用数组数组来保存屏幕的输出。(不确定,但我认为如果我直到最后都不将线条连接成一个字符串会更快,但我这样做是因为它是第一个想法而不是因为速度)。

如果有0,我不确定我应该这样做。

这是来自 ervy 库的两个图的输出

在此处输入图像描述

正确的情节

在此处输入图像描述

没有零代码的情节。

我正在尝试调试我的代码(我认为在某一点上,情节看起来在第二个屏幕上),但我不知道如何处理 0 ANSI 转义码。

我使用维基百科作为参考。

bash terminal
  • 2 个回答
  • 644 Views
Martin Hope
jcubic
Asked: 2019-11-15 04:40:17 +0800 CST

ASCII 字符 26 应该做什么?

  • 0

我有显示 ANSI 艺术的代码,我发现最后 128 个字节包含SAUCE元数据。

我遇到的问题是在 SAUCE 数据之前有一个字符看起来不合适,

在此处输入图像描述

即 ANSI 代码 26,ASCII 表将其显示为(替代)。

这个角色应该怎么做?它是否应该导致它被忽略之后的任何事情?

这是我的 JavaScript 终端的演示,它显示了 ANSI 艺术(工作命令是ls和cat)。

列出的一些 ANSI 文件末尾有这个字符(并非所有文件都有 SAUCE 数据)。

character-encoding
  • 1 个回答
  • 1288 Views
Martin Hope
jcubic
Asked: 2018-12-08 13:58:10 +0800 CST

下载源码包时如何忽略rpmfusion source repos

  • 0

我的 Fedora 安装中有几个 rpm 存储库,我想下载源包,但出现同步失败的rpmfusion-free-updates-source错误rpmfusion-nonfree-updates-source。他们可能没有来源。

我执行了这个命令,返回错误:

sudo dnf download --source hicolor-icon-theme

是否可以忽略 repo,而不是只为一个命令禁用它?下载成功,但我想知道这样的事情是否可行。

fedora rpm
  • 1 个回答
  • 189 Views
Martin Hope
jcubic
Asked: 2018-10-16 23:23:59 +0800 CST

在 Fedora 上重新启动后找不到蓝牙设备

  • 3

我刚刚重新启动了蓝牙,但没有使用systemctl restart我使用过的systemctl stop然后systemctl start,状态如下所示:

$ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-10-16 09:14:16 CEST; 1min 27s ago
     Docs: man:bluetoothd(8)
 Main PID: 26199 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bluetooth.service
           └─26199 /usr/libexec/bluetooth/bluetoothd

paź 16 09:14:16 jcubic systemd[1]: Starting Bluetooth service...
paź 16 09:14:16 jcubic bluetoothd[26199]: Bluetooth daemon 5.49
paź 16 09:14:16 jcubic systemd[1]: Started Bluetooth service.
paź 16 09:14:16 jcubic bluetoothd[26199]: Starting SDP server
paź 16 09:14:16 jcubic bluetoothd[26199]: Bluetooth management interface 1.14 initialized

但是配置面板给了我没有找到适配器并且hciconfig没有结果的错误。

我已经尝试安装bluez-hid2hci(我已经在某处读过这方面的内容),但没有任何效果后我将其卸载。

我已经重新启动了机器,但是我没有在任务栏中看到蓝牙图标,我在终端中有这个:

$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)
$ dmesg | grep blue
[    8.591069] SELinux:  Class bluetooth_socket not defined in policy.

经过一番挖掘,我注意到没有加载蓝牙内核模块,所以我使用了:

# modeprobe bluetooth
# systemctl restart bluetooth
# cd /etc/modules-load.d
# echo "bluetooth" >> bluetooth.conf

现在我与开始时相同 systemctl status show active 但重新启动后没有图标,此输出:

# rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

dmesg 的输出:

# dmesg | grep -i blue
[    8.798170] SELinux:  Class bluetooth_socket not defined in policy.
[   16.146091] Bluetooth: Core ver 2.22
[   16.146132] Bluetooth: HCI device and connection manager initialized
[   16.146135] Bluetooth: HCI socket layer initialized
[   16.146136] Bluetooth: L2CAP socket layer initialized
[   16.146141] Bluetooth: SCO socket layer initialized
[  318.675520] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  318.675524] Bluetooth: BNEP filters: protocol multicast
[  318.675531] Bluetooth: BNEP socket layer initialize

如何在 Fedora 或任何其他具有类似设置的 Linux 发行版上启用蓝牙?我有戴尔笔记本电脑。

fedora bluetooth
  • 1 个回答
  • 3589 Views
Martin Hope
jcubic
Asked: 2018-10-15 23:46:59 +0800 CST

这些 ANSI 艺术品使用什么类型的编码?

  • 14

我找到了这个网站;它有所有艺术品的 zip 文件(主页上的链接)。其中一些有.ans扩展名,它们看起来像 Linux/Unix 上使用的 ANSI 转义码,但是当我cat在 XFce 终端中打开其中一个时,它会产生垃圾(但有颜色)。它们看起来不像图片库。

链接中主要作品的第一行如下所示(从 Emacs 复制):

[0;1m[30mthere is no substitute [0;33mÜܲ[1;43m°±²²[40mÛ[43mÛ²±[0;33mÝ ßÜ[1;43m²²²[40mÛÛ²[40m[K

文件类型是 DOS,但它们可以只在 Windows 上创建。

在搜索 ANSI 艺术时,我还发现这个网站的 zip 文件只包含带有.ans扩展名的文件,而且它们在 Linux 上也不能正确呈现(第 2 页上的画廊)。

我的问题是:

  • 这是什么类型的编码,适用于什么计算机?
  • 我需要一个特殊的查看器才能在 Linux 终端上看到它吗?
  • 你知道这种艺术作品是为 Linux/Unix 终端创作的吗?我只发现了 ASCII 艺术。
  • 是否可以将其转换为在 Linux 终端上查看?
linux ansi-term
  • 1 个回答
  • 2600 Views
Martin Hope
jcubic
Asked: 2018-09-30 00:31:17 +0800 CST

如何在 Fedora 上安装 php + mysql?

  • 1

我正在尝试在本地安装 wordpress。我已经安装了 mysql (MariaDB) 和 php-mysqli。我从 mysql 控制台创建了用户和数据库,我有这 3 个文件:

$ cd /etc/php.d/
$ cat 30-mysqli.ini 30-pdo_mysql.ini 20-mysqlnd.ini 
; Enable mysqli extension module
extension=mysqli.so
; Enable pdo_mysql extension module
extension=pdo_mysql.so
; Enable mysqlnd extension module
extension=mysqlnd.so

当我安装 php-mysqli 时自动添加。文件存在于/usr/lib64/php/modules/

但我已经重新启动了 httpd 服务器

sudo systemctl restart httpd

我仍然有错误:

调用未定义的函数mysqli_connect()

使用代码时:

 $link = mysqli_connect("localhost", "wordpress", "wordpress", "wordpress");

当我运行 phpinfo() 时,我在模块部分得到了这个,但没有配置 mysql 和 pdo 配置只有 sqlite。

用于 php 的 mysql 模块

函数get_loaded_extensions()不返回 mysql 扩展名。

并php -i显示 mysql 和 mysql pdo 的配置。

我也尝试重新启动系统,但这没有任何效果。

如何在 Fedora 27 上安装 php + mysql?我有 php 7.1.22。

编辑:似乎 mysql 的 ini 文件没有被解析,它们不在文件列表中。这些文件是读取访问权限,并且它们像其他文件一样由 root 拥有:

$ ls -l {30-mysqli.ini,30-pdo_mysql.ini,20-mysqlnd.ini}
-rw-r--r--. 1 root root 55 09-12 07:12 20-mysqlnd.ini
-rw-r--r--. 1 root root 53 09-12 07:12 30-mysqli.ini
-rw-r--r--. 1 root root 59 09-12 07:12 30-pdo_mysql.ini

编辑2:

$ php --ri mysqli && php --ri mysqlnd && php --ri pdo && php --ri pdo_mysql

mysqli

MysqlI Support => enabled
Client API library version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Active Persistent Links => 0
Inactive Persistent Links => 0
Active Links => 0

Directive => Local Value => Master Value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.allow_persistent => On => On
mysqli.rollback_on_cached_plink => Off => Off
mysqli.default_host => localhost => localhost
mysqli.default_user => no value => no value
mysqli.default_pw => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
mysqli.reconnect => Off => Off
mysqli.allow_local_infile => On => On

mysqlnd

mysqlnd => enabled
Version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Compression => supported
core SSL => supported
extended SSL => supported
Command buffer size => 4096
Read buffer size => 32768
Read timeout => 31536000
Collecting statistics => Yes
Collecting memory statistics => No
Tracing => n/a
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
API Extensions => mysqli,pdo_mysql

mysqlnd statistics =>  
bytes_sent => 0
bytes_received => 0
packets_sent => 0
packets_received => 0
protocol_overhead_in => 0
protocol_overhead_out => 0
bytes_received_ok_packet => 0
bytes_received_eof_packet => 0
bytes_received_rset_header_packet => 0
bytes_received_rset_field_meta_packet => 0
bytes_received_rset_row_packet => 0
bytes_received_prepare_response_packet => 0
bytes_received_change_user_packet => 0
packets_sent_command => 0
packets_received_ok => 0
packets_received_eof => 0
packets_received_rset_header => 0
packets_received_rset_field_meta => 0
packets_received_rset_row => 0
packets_received_prepare_response => 0
packets_received_change_user => 0
result_set_queries => 0
non_result_set_queries => 0
no_index_used => 0
bad_index_used => 0
slow_queries => 0
buffered_sets => 0
unbuffered_sets => 0
ps_buffered_sets => 0
ps_unbuffered_sets => 0
flushed_normal_sets => 0
flushed_ps_sets => 0
ps_prepared_never_executed => 0
ps_prepared_once_executed => 0
rows_fetched_from_server_normal => 0
rows_fetched_from_server_ps => 0
rows_buffered_from_client_normal => 0
rows_buffered_from_client_ps => 0
rows_fetched_from_client_normal_buffered => 0
rows_fetched_from_client_normal_unbuffered => 0
rows_fetched_from_client_ps_buffered => 0
rows_fetched_from_client_ps_unbuffered => 0
rows_fetched_from_client_ps_cursor => 0
rows_affected_normal => 0
rows_affected_ps => 0
rows_skipped_normal => 0
rows_skipped_ps => 0
copy_on_write_saved => 0
copy_on_write_performed => 0
command_buffer_too_small => 0
connect_success => 0
connect_failure => 0
connection_reused => 0
reconnect => 0
pconnect_success => 0
active_connections => 0
active_persistent_connections => 0
explicit_close => 0
implicit_close => 0
disconnect_close => 0
in_middle_of_command_close => 0
explicit_free_result => 0
implicit_free_result => 0
explicit_stmt_close => 0
implicit_stmt_close => 0
mem_emalloc_count => 0
mem_emalloc_amount => 0
mem_ecalloc_count => 0
mem_ecalloc_amount => 0
mem_erealloc_count => 0
mem_erealloc_amount => 0
mem_efree_count => 0
mem_efree_amount => 0
mem_malloc_count => 0
mem_malloc_amount => 0
mem_calloc_count => 0
mem_calloc_amount => 0
mem_realloc_count => 0
mem_realloc_amount => 0
mem_free_count => 0
mem_free_amount => 0
mem_estrndup_count => 0
mem_strndup_count => 0
mem_estrdup_count => 0
mem_strdup_count => 0
mem_edupl_count => 0
mem_dupl_count => 0
proto_text_fetched_null => 0
proto_text_fetched_bit => 0
proto_text_fetched_tinyint => 0
proto_text_fetched_short => 0
proto_text_fetched_int24 => 0
proto_text_fetched_int => 0
proto_text_fetched_bigint => 0
proto_text_fetched_decimal => 0
proto_text_fetched_float => 0
proto_text_fetched_double => 0
proto_text_fetched_date => 0
proto_text_fetched_year => 0
proto_text_fetched_time => 0
proto_text_fetched_datetime => 0
proto_text_fetched_timestamp => 0
proto_text_fetched_string => 0
proto_text_fetched_blob => 0
proto_text_fetched_enum => 0
proto_text_fetched_set => 0
proto_text_fetched_geometry => 0
proto_text_fetched_other => 0
proto_binary_fetched_null => 0
proto_binary_fetched_bit => 0
proto_binary_fetched_tinyint => 0
proto_binary_fetched_short => 0
proto_binary_fetched_int24 => 0
proto_binary_fetched_int => 0
proto_binary_fetched_bigint => 0
proto_binary_fetched_decimal => 0
proto_binary_fetched_float => 0
proto_binary_fetched_double => 0
proto_binary_fetched_date => 0
proto_binary_fetched_year => 0
proto_binary_fetched_time => 0
proto_binary_fetched_datetime => 0
proto_binary_fetched_timestamp => 0
proto_binary_fetched_string => 0
proto_binary_fetched_json => 0
proto_binary_fetched_blob => 0
proto_binary_fetched_enum => 0
proto_binary_fetched_set => 0
proto_binary_fetched_geometry => 0
proto_binary_fetched_other => 0
init_command_executed_count => 0
init_command_failed_count => 0
com_quit => 0
com_init_db => 0
com_query => 0
com_field_list => 0
com_create_db => 0
com_drop_db => 0
com_refresh => 0
com_shutdown => 0
com_statistics => 0
com_process_info => 0
com_connect => 0
com_process_kill => 0
com_debug => 0
com_ping => 0
com_time => 0
com_delayed_insert => 0
com_change_user => 0
com_binlog_dump => 0
com_table_dump => 0
com_connect_out => 0
com_register_slave => 0
com_stmt_prepare => 0
com_stmt_execute => 0
com_stmt_send_long_data => 0
com_stmt_close => 0
com_stmt_reset => 0
com_stmt_set_option => 0
com_stmt_fetch => 0
com_deamon => 0
bytes_received_real_data_normal => 0
bytes_received_real_data_ps => 0

PDO

PDO support => enabled
PDO drivers => mysql, sqlite

pdo_mysql

PDO Driver for MySQL => enabled
Client API version => mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $

Directive => Local Value => Master Value
pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
fedora mysql
  • 3 个回答
  • 5967 Views
Martin Hope
jcubic
Asked: 2018-09-16 23:12:19 +0800 CST

如何在 Fedora 中添加 rpm 融合测试存储库?

  • 2

这与如何将 RPM Fusion 和 livna 存储库添加到 Fedora?但我想安装测试存储库,这样我就可以拥有 Chromium 68。我有测试 fedora 存储库,我需要chromium-libs-media-freeworld-68因为存在冲突,chromium-libs-media-freeworld-67 需要 chromium-libs-67,但 chromium 需要 68)。

我正在搜索https://download1.rpmfusion.org http 目录并找到了这个:

https://download1.rpmfusion.org/free/fedora/updates/testing/27/x86_64/

但没有 rpm 可用于dnf install. 如何安装测试 rpm 融合存储库?

我有 Fedora 27。

fedora rpm
  • 1 个回答
  • 1286 Views
Martin Hope
jcubic
Asked: 2018-06-05 08:56:52 +0800 CST

如何在 Fedora 上将 npm 更新到最新版本

  • 2

我试着运行这个:

sudo npm install npm@latest -g

测试npm audit,但是这个命令失败了,我有错误:

npm ERR! path /usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic
npm ERR! code EEXIST
npm ERR! errno -17
npm ERR! syscall mkdir
npm ERR! EEXIST: file already exists, mkdir '/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic'
npm ERR! File exists: /usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic
npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-06-04T16_50_00_242Z-debug.log

要恢复状态,我需要使用 dnf 安装 npm(我需要删除npmthen/usr/lib/node_modules并再次安装 npm)。

如果我移动文件(它是符号链接),那么我有错误:

npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'fs-write-stream-atomic'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-06-04T18_09_09_479Z-debug.log

如何在 Fedora 上安装 npm 6?

fedora node.js
  • 2 个回答
  • 3876 Views
Martin Hope
jcubic
Asked: 2018-05-29 08:57:47 +0800 CST

如何反转Makefile中的错误代码

  • 3

我想测试文件是否包含模式(当从 travis 运行时,跳过了应该使我的构建失败的 jasmine 测试)。

我有这样的代码:

skipped_tests:
    $(if $(shell grep -E 'iit|ddescribe' spec/terminalSpec.js), @false, @true)

grep问题是当它找到与模式匹配的行时,我没有得到输出。我想要这个,所以我可以在 travis 构建日志中查看导致问题的行。有没有办法反转命令错误代码(返回非 0 时返回 0,反之亦然)?

我也试过这个:

skipped_tests:
    grep -E 'iit|ddescribe' spec/terminalSpec.js
    @test $$? -eq 0 # should it be -ne

但这会回显一条有iit并且没有失败的行,如果它没有找到该行,那么它会在 grep 上失败。

grep make
  • 3 个回答
  • 2766 Views
Martin Hope
jcubic
Asked: 2018-04-21 04:28:43 +0800 CST

将所有找到的 m4a 转换为 mp3

  • 7

我正在尝试将所有 m4a 转换为 mp3 我的代码如下所示:

find . -name '*.m4a' -print0 | while read -d '' -r file; do
  ffmpeg -i "$file" -n -acodec libmp3lame -ab 128k "${file%.m4a}.mp3";
done

但它只适用于第一个 mp3 文件,接下来会显示错误:

Parse error, at least 3 arguments were expected, only 1 given in string '<All files in one line>'

Enter command: <target>|all <time>|-1 <command>[ <argument>]

这些文件包含空格和括号。

bash ffmpeg
  • 3 个回答
  • 7976 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

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

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve