ubuntu22.04:使用时遇到的问题

应用软件

网易云音乐无法打开
sudo gedit /opt/netease/netease-cloud-music/netease-cloud-music.bash

将内容改成下面这样

#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
export LD_LIBRARY_PATH=/opt/netease/netease-cloud-music/libs
export QT_PLUGIN_PATH="${HERE}"/plugins
export QT_QPA_PLATFORM_PLUGIN_PATH="${HERE}"/plugins/platforms
cd /lib/x86_64-linux-gnu/ # <<<<<<<<<<<<<<<<<<<<<唯一插入的命令<<<<<<<<<<<<<<<
exec "${HERE}"/netease-cloud-music $@
腾讯会议无法打开
sudo vi /etc/gdm3/custom.conf

把其中的 #WaylandEnable=false 的注释井号去掉,保存退出

sudo service gdm3 restart

程序调试

pstack运行错误:
sudo rm -rf /usr/bin/pstak
sudo nano /usr/bin/pstack

在nano界面中粘贴以下内容并保存。

#!/bin/sh

if test $# -ne 1; then
    echo "Usage: `basename $0 .sh` <process-id>" 1>&2
    exit 1
fi

if test ! -r /proc/$1; then
    echo "Process $1 not found." 1>&2
    exit 1
fi

# GDB doesn't allow "thread apply all bt" when the process isn't
# threaded; need to peek at the process to determine if that or the
# simpler "bt" should be used.

backtrace="bt"
if test -d /proc/$1/task ; then
    # Newer kernel; has a task/ directory.
    if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
	backtrace="thread apply all bt"
    fi
elif test -f /proc/$1/maps ; then
    # Older kernel; go by it loading libpthread.
    if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
	backtrace="thread apply all bt"
    fi
fi

GDB=${GDB:-/usr/bin/gdb}

if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
    readnever=--readnever
else
    readnever=
fi

# Run GDB, strip out unwanted noise.
$GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 | 
set width 0
set height 0
set pagination no
$backtrace
EOF
/bin/sed -n \
    -e 's/^\((gdb) \)*//' \
    -e '/^#/p' \
    -e '/^Thread/p'

内核学习

make生成配置菜单时:‘make menuconfig’ requires the ncurses libraries.
sudo apt-get install libncurses5-dev
make编译linux内核时:“Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel”. Stop.
sudo apt install libelf-dev
sudo apt install libssl-dev
make编译linux内核时:thunk_64.o: warning: objtool: missing symbol table

可以使用make menuconfig为内核启用CONFIG_PREEMPT;只需从菜单选项中选择它。要验证它是否已启用,请检查make menuconfig为以下行生成的.config文件:

CONFIG_PREEMPT=y

也可以手动进行修改(make menuconfig只是一个用于创建.config文件的GUI)。

qemu-linux报错‘Read-only file system’

查看系统启动log,发现加载方式确实是只读的, 采用如下命令可以解决

mount -o remount rw /
glibc编译问题:all warnings being treated as errors

因为启用了“所有警告都当作是错误”的功能。在运行make命令之前,先运行

./configure --with-cc-opt=-Wno-error

可以禁用这个功能。
或者,找到相应的Makefile,去掉编译选项中的 -Werror

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
Ubuntu 22.04上安装和使用Wine,您可以按照以下步骤进行操作: 1. 添加存储库密钥: 打开终端并执行以下命令: ``` sudo dpkg --add-architecture i386 sudo wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add - ``` 2. 启用Wine存储库: 执行以下命令将Wine存储库添加到系统中: ``` sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ $(cat /etc/os-release | grep UBUNTU_CODENAME | cut -d '=' -f 2) main" ``` 3. 更新软件包列表: 执行以下命令以更新软件包列表: ``` sudo apt update ``` 4. 安装Wine: 执行以下命令以安装Wine及其建议的软件包: ``` sudo apt install --install-recommends winehq-stable ``` 5. 配置Wine: 执行以下命令以打开Wine配置界面: ``` winecfg ``` 6. 卸载软件: 若要卸载通过Wine安装的软件,执行以下命令: ``` wine uninstaller ``` 7. 解决中文字体乱码: 如果您在使用Wine遇到中文字体乱码问题,您可以在Wine配置界面中进行相应的设置。 请注意,上述步骤是基于官方文档和资源提供的。如果您希望使用其他源或更新版本的Wine,请参考相应的官方文档或资源。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [如何在 Ubuntu 22.04 上安装 最新版本Wine](https://blog.csdn.net/taoxicun/article/details/127894553)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [ubuntu22.04 安装 wine8.0](https://blog.csdn.net/qq_36327203/article/details/130029343)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lcy_Knight

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值