EMCola 浪迹于互联网世界,混迹于天地之间,关注网络空间、人生点滴、思想星光 EMCola is my space for my life & my idea & knowledge
2024年1月27日 星期六
ModuleNotFoundError: No module named 'flask' on calibre_web
- OS: Qnap
- How docker service was installed: Portainer
Container logs:
from cps.main import main
File "/app/calibre-web/cps/__init__.py", line 28, in
from flask import Flask
ModuleNotFoundError: No module named 'flask'
fixed:
editing the container ENV PATH to: /lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Success==================================================================================================
[migrations] started
[migrations] no migrations found
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
[custom-init] No custom files found, skipping...
[ls.io-init] done.
2023年2月9日 星期四
Docker install Trojan-go Xray
方法一:选择时区
1.执行命令:
dpkg-reconfigure tzdata
2.选择Asia->Shanghai
防止系统重启后时区改变,执行下面一行命令
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
参考处处:
作者:Leon_Geo
链接:https://www.jianshu.com/p/ef851a01d9de
================== Trojan-go SETUP ======================
docker run \
--name trojan-go \
-d \
-v /etc/trojan-go/:/etc/trojan-go \
--network host \
p4gefau1t/trojan-go
tls 证书 同样copy into /etc/trojan-go
geoip 等路径 默认为docker image 内置的路径,不需要修改: /usr/bin
config.json:
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 12345,
"remote_addr": "127.0.0.1",
"remote_port": 80,
"password": [
"Password1"
],
"ssl": {
"cert": "/etc/trojan-go/**.crt",
"key": "/etc/trojan-go/**.key",
"sni": " youdomain.com ",
"alpn": [
"http/1.1"
],
"fallback_port": 80
}
}
================== Xray SETUP ======================
docker run -d -p 12345:12345 --name xray --restart=always -v /etc/xray:/etc/xray teddysun/xray
config.json:
{
"log": {
"loglevel": "error"
},
"inbounds": [
{
"port": 12345,
"protocol": "vless",
"settings": {
"clients": [
{
"id": " UUID ",
"flow": "xtls-rprx-direct",
"level": 0,
"email": "asafss@exadeeefdmple.com"
}
],
"decryption": "none",
"fallbacks": [
{
"dest": 80,
"xver": 1
}
]
},
"streamSettings": {
"network": "tcp",
"security": "xtls",
"xtlsSettings": {
"alpn": [
"http/1.1",
"h2"
],
"certificates": [
{
"certificateFile": "youdomain.crt",
"keyFile": "youdomain..key"
}
]
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
2023年2月2日 星期四
Brother DCP-T310 安装CUPS的Docker驱动程序
https://stackoverflow.com/questions/71276329/cups-usb-printer-wont-print-after-restarting-the-printer
Set standard options in Portainer for olbat/cupsd: docker run -d -p 631:631 -v /var/run/dbus:/var/run/dbus --name cupsd olbat/cupsd
Add only one another volume: /dev/bus/usb:/dev/bus/usb
Enable privileged mode.
***********************************************************************
Brother DCP-T310 没有64bit 驱动程序,可以使用以下办法安装
wget https://download.brother.com/welcome/dlf006893/linux-brprinter-installer-2.2.3-1.gz
gzip -d linux-brprinter-installer-2.2.3-1.gz
sudo bash linux-brprinter-installer-2.2.3-1 DCP-T310
***********************************************************************
Add printers to the Cups server
Connect to the Cups server at http://127.0.0.1:631
Add printers: Administration > Printers > Add Printer
Note: The admin user/password for the Cups server is print/print
2023年1月20日 星期五
UBNT_ERX 路由器开启ipv6
Config Tree -> firewall / options / mss-clamp6
一般标准的 PPPoE 环境 IPv6 MSS 值应该是 1432 (1500-8-40-20),
如果设成1432还是有问题可以再改小试试,有人曾改到 1382 才可以。
interfaces/ethernet/eth0/pppo/0/dhcpv6-pd/pd/0/interface,如果只用1个ip段的内网,就设定
host-address为::1
prefix-id为:1(因为有2个内网段192.168.1.x和192.168.2.x)
service为slaac。
上面的步骤到点开pd/0后显示/64,把/64改成/60,不会报错了
interfaces / ethernet / eth0 / pppoe / 0 / ipv6 / address,点+
interfaces / ethernet / eth0 / pppoe / 0 / ipv6 / enable,点+
以上设置完成后Preview即可生效,如果ipv6 DNS服务器经常抽风,导致打开网页最开始会很卡,可以在IPv6里面启用no-dns选项。
如果运营商给的地址是/64,没有DHCPv6-PD,可以通过IPv6 NDP解决,OpenWRT实现的外网网卡是eth0,内网是br-lan,先安装ndppd
2020年2月23日 星期日
$ sudo service apache2 restart Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
手贱,想解决ssl 无法访问的问题,修改apache2配置,结果出问题了:
最终解决了。
1、重新安装apache2
重新安装了apache2,网站正常访问了,但是php却无法正常运行,
问题是这个
php7.3没有运行,
所以:sudo a2enmod php7.3
但是出现如下提示:
Considering dependency mpm_prefork for php7.3:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php7.3, aborting
所以接着:
sudo a2dismod mpm_event
Module mpm_event disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
OK,解决了
$ sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
虽然找到了许多网友的解决办法,但是没有一个全套解决办法,只好耐心一个合着试验,最终解决了。
1、重新安装apache2
$ systemctl restart apache2
$ journal -xe
$ sudo apt-get purge apache2
$ sudo apt autoremove apache2
$ sudo apt-get purge apache2
$ sudo apt-get purge apache2*
$ sudo apt-get install apache2
$ sudo service apache2 start
2、重点在这里:重新安装了apache2,网站正常访问了,但是php却无法正常运行,
问题是这个
php7.3没有运行,
所以:sudo a2enmod php7.3
但是出现如下提示:
Considering dependency mpm_prefork for php7.3:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php7.3, aborting
所以接着:
sudo a2dismod mpm_event
Module mpm_event disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
OK,解决了
2020年1月1日 星期三
installing boost 166
issue:
# cmake .. -DENABLE_MYSQL=OFF -DENABLE_SSL_KEYLOG=ON -DFORCE_TCP_FASTOPEN=ON -DSYSTEMD_SERVICE=AUTO
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Boost: Found unsuitable version "1.65.1", but required is at
least "1.66.0" (found /usr/include)
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:391 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindBoost.cmake:2179 (find_package_handle_standard_args)
CMakeLists.txt:39 (find_package)
-- Configuring incomplete, errors occurred!
See also "/root/trojan/build/CMakeFiles/CMakeOutput.log".
See also "/root/trojan/build/CMakeFiles/CMakeError.log".
- Download Boost from official source
- Extract it
- Open terminal and cd to extracted dir
- run "./bootstrap.sh --help" command to see help
- Then run "./bootstrap.sh" command it will take some time to build
- Then run "sudo ./b2 install" to install boost.
- The default installation location are "/usr/local/inlcude/boost" for header files and "/usr/local/lib" for compiled libraries
refrence:
https://waqarrashid33.blogspot.com/2017/12/installing-boost-166-in-ubuntu-1604.html
2019年5月13日 星期一
Fedora iptable firewalld selinux
Fedora server 30 默认开启了iptables,造成我安装各种httpd、plexmediaserver等,均无法从远程登陆,无法设置端口,因此我处理如下:
systemctl stop firewalld dnf install iptables-services
重启系统
systemctl restart iptables
systemctl stop iptables
然后iptables -L -n,显示如下:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
这样,就可以放心使用firewalld
systemctl stop firewalld dnf install iptables-services
重启系统
systemctl restart iptables
systemctl stop iptables
然后iptables -L -n,显示如下:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
这样,就可以放心使用firewalld
訂閱:
文章 (Atom)
Calibre_web administrator password forget
Calibre_web administrator password forget how to reset the admin password: need to specify the app.db docker exec -it calibre-web cd...
-
Config Tree -> firewall / options / mss-clamp6 一般标准的 PPPoE 环境 IPv6 MSS 值应该是 1432 (1500-8-40-20), 如果设成1432还是有问题可以再改小试试,有人曾改到 1382 才可以。 ...
-
Calibre_web administrator password forget how to reset the admin password: need to specify the app.db docker exec -it calibre-web cd...
-
Micro:bit to Scratch Requirements Install Scratch Link