解决自编译 Python 报错 No module named '_ssl'

我在我的 nas 上安装了自编译的 python 3.8-3.12 版本,但是使用的时候报错: No module named '_ssl' 这是我的编译参数: ./configure --enable-loadable-sqlite-extensions --prefix=$TARGET_DIR --with-openssl=/usr/include/openssl 问题是是出在 --with-openssl=/usr/include/openssl 上,--with-openssl 参数实际上是为了使用自编译的 openssl 的,假如编译 openssl 的时候使用了 --prefix 参数: ./config --prefix=/usr/…

Git 添加 SSH 密钥、多个 SSH 密钥教程

教程仅详细说明如何创建密钥,至于如何将密钥上传至 Git 托管平台请查阅对应平台的帮助文档。 创建密钥 创建密钥推荐在 Linux 上操作,例如 Debian 等,因为其自带相关工具不用额外操作。 密钥创建命令: ssh-keygen -t ed25519 -C your_email@example.com * -t:这个是密钥格式,一般来讲可以用 ed25519,部分老平台可能不支持这个算法,此时可以换成 rsa。 * -C:此参数实际作用为添加注解,用于区分不同密钥,简单来讲就是取个名字。 创建过程: madray@NAS:~$ ssh-keygen -t ed25519 -C your_email@example.com Generating public/private ed25519 key…

Android 反射调用 SDK 隐藏方法抛错 NoSuchMethodError

参考文章:针对非 SDK 接口的限制 | Android 开发者 | Android Developers 最近在写 Android 系统应用的时候,因为某些特殊原因无法接触到 AOSP 开发环境,只能通过第三方应用 + 系统签名的方式调试。 其中一个功能是要通过 EthernetManager 获取到 configuration,于是乎首先用先前在 Android 8.0 上的经验,用反射的方式调用方法: EthernetManager.getMethod("getConfiguration", String::class.java) .invoke(getSystemService("ethernet"), target) ?: IpConfiguration.newInstance() 但是这段代码抛错 NoSuchMethodError,直接列举所有方法也只有屈指可数的少数几个方法: 12:29:38.203 ReflectTest…

Symbol is declared in module X which does not export package X

前排提示,此方法适用于 Gradle + Kotlin 的项目。 在写 sgpublic/XXPreference: Manage SharedPreference with annotation! (github.com) 项目的时候,我需要使用 java.compiler 中的内容修改 Java 语法树,于是乎便遇到了以下报错: Symbol is declared in module 'jdk.compiler' which does not export package 'com.sun.tools.javac.tree' 网上找到的方法是在 gradle.propertise 中添加 -add-exports: org.…

Lombok 插件与 Android Studio 不兼容解决方案

参考文章:sgpublic/lombok-plugin-repository: A repository for Lombok plugin incompatibility issues with Android Studio. (github.com) 从 IDEA 2020.2.* 开始,Lombok Plugin 开始内置,且无法在插件商城下载到后续版本,而 Android Studio 却在此时删除了 Lombok Plugin 的内置,从商城上下载的版本会提示与当前 Android Studio 不兼容,此文便是解决方案。 Plugin repository(推荐) 1. 前往 File -> Settings -> Plugins,点击 Install…

WebRTC Android 运行 build_aar.py 报错 You can often set treat_warnings_as_errors=false...

编译 webrtc_android 时,build_aar.py 运行时出现警告: 注:xxx.java 使用或覆盖了已过时的 API。 注:有关详细信息,请使用 -Xlint:deprecation 重新编译。 随即出现 python 的错误堆栈提示,编译停止并出现以下提示: ... You can often set treat_warnings_as_errors=false to not treat output as failure (useful when developing locally). [100/30872] ACTION //components/resour…d/toolchain/android:…