2018-11-20

/bin/bash^M: bad interpreter: No such file or directory



Unix uses different line feeds and carriage returns so can't read the file you created on Windows. Hence it is seeing ^M as an illegal character.

In windows, using Notepad+ change to UNIX format.



参考资料: -bash: ./my_script: /bin/bash^M: bad interpreter: No such file or directory [duplicate]


 

2018-11-17

如何修改Docker里的源

In order to apt install, I need to change sources in /etc/apt/sources.list file.


However we don't have any editor, we can only using bash command echo to insert the source address to the file. The command is as following:


PS: source address in here and here




[code]
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse" > /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list
[/code]



then update:

apt-get update -y && apt-get -y upgrade

2018-11-15

Mujoco-py安装Debug

最近在学习强化学习,发现安装mujoco-py还是有些坑的。在此把遇到的问题整理出来:

首先需要在.bashrc里写入环境变量:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/xx/.mujoco/mjpro150/bin



问题一:

error: [Errno 2] No such file or directory: 'patchelf'

解决方法:

sudo apt install patchelf

问题二:

fatal error: GL/osmesa.h: No such file or directory

解决方法:

sudo apt-get install libosmesa6-dev

2018-11-14

使用word写博客

这篇文章是使用word写的。测试是否好用。

测试图片:(看来只能文字,可以更新)



2018-11-13

没有得看紫竹张先生了




最近这两周网信办再整治自媒体。把我每天早上上班路上必看的紫竹给封了。也许导火索是最后一篇揭露彩票贪腐的文章。



甚至被人民日报点名了。真是搞笑,只允许自己报道,不许别人发文。

Ubuntu SSR setting

使用electron-ssr客户端 https://github.com/shadowsocksrr/electron-ssr 设置proxy