重啟 iptables或reload rules 后, docker 的網絡轉發會錯亂
需要重啟 dockerd 和所有 contianer
所以改 iptables 規則的時候,最好 -I 插到相應位置就可以了
不用重啟 iptables
Windows環境下,Rstudio中使用testthat的中文編碼問題
Sys.setlocale(category = "LC_ALL", locale = "English_United States.1252")
R里面打package,運行devtools::document()報錯Error in file(con, "r") : cannot open the connection
有的代碼里面把@examples 寫成了 @example
jupyter r-notebook docker 安裝lintr出錯
安裝lintr的依賴包stringdist時報錯說:undefined symbol: GOMP_parallel debian
解決方案:到/opt/conda目錄下執行:conda install -y gcc
rmysql包報一堆warning 如:invalid class “MySQLResult” object: invalid object for slot "Id" in class "MySQLResult"
具體錯誤:Error in validObject(.Object) :
invalid class “MySQLResult” object: invalid object for slot "Id" in class "MySQLResult": got class "list", should be or extend class "integer"
Calls: dbSendQuery ... .local -> new -> initialize -> initialize -> validObject
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted
權威解答線索來自:https://github.com/rstats-db/RMySQL/issues/40。在這個帖子里,作者的權威解決方案是升級到dev版(0.11.x),他在dev版統一解決了。但dev畢竟沒正式發布,為此圍觀群眾群策群力,提出了臨時解決方案,我試好的解決方案如下:
第一步:加dbColumnInfo(rs)在dbfetch(rs)之前,此步解決error的問題。
第二步:將dbSendQuery的warnings生生關閉,具體為:
suppressWarnings(
rs <- dbSendQuery(conn, sql)
)
修改sshd的端口號后啟動sshd失敗
修改/etc/ssh/sshd_config中的port的值后,啟動sshd發現失敗,報permission denied.
原因: If you want to change the port on a SELinux system, you have to tell SELinux about this change.
修正方法:semanage port -m -t ssh_port_t -p tcp #portnumber
然后啟動服務成功