运行 docker exec 报错 the input device is not a TTY

在使用 docker in docker 时,在容器内执行命令刷新 nginx: docker exec -it nginx-nginx-1 nginx -s reload 结果一直报错: the input device is not a TTY 查阅帮助文档: madray@pve:/mnt/core/app/nginx/conf.d$ docker exec --help Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...] Execute a command in a running container…

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.…

Ubuntu 22.04.1 安装 WordPress (Nginx+MariaDB+PHP)

参考文章 CentOS7安装Nextcloud13 使用(Nginx+MariaDB+PHP)_WolfBolin技术博客-CSDN博客 环境说明 * WSL Ubuntu 22.04.1 基础初始化 新服务器中所有自带服务都需要更新 sudo apt update && sudu apt upgrade -y 安装 nginx 并添加基础配置 sudo apt install nginx -y 安装完成之后打开文件 /etc/nginx/nginx.conf ,前五十行中包含以下内容: ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/…

WSL Ubuntu 22.04 systemctl 命令报错

参考文献:Advanced settings configuration in WSL | Microsoft Learn 在 WSL Ubuntu 22.04 下,systemctl 命令报错以下内容: System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down 解决方案 安装 wsl-setup sudo apt install wsl-setup 配置…

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:…