sudo vi /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源碼 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # Canonical 合做夥伴和附加 deb http://archive.canonical.com/ubuntu/ xenial partner deb http://extras.ubuntu.com/ubuntu/ xenial main
tar -xzvf VMwareTools-10.1.15-6627299.tar.gz
sudo ./vmware-install.pl
env: bash\r: No such file or directorymake.sh 編譯出錯!
The error message suggests that the script you're invoking has embedded \r
characters, which in turn suggests that it has Windows-style \r\n
line endings instead of the \n
-only line endings bash
expects.html
As a quick fix, you can remove the \r
chars. as follows:ios
sed $'s/\r$//' ./install.sh > ./install.Unix.sh
and then rungit
./install.Unix.sh --clang-completer
However, the larger question is why you've ended up with \r\n
-style files - most likely, other files are affected, too.github
Perhaps you're running Git on Windows, where a typical configuration is to convert Unix-style \n
-only line breaks to Windows-style \r\n
line breaks on checking files out and re-converting to \n
-only line breaks on committing.ubuntu
While this makes sense for development on Windows, it gets in the way of installation scenarios like these.bash
To make Git check out files with Unix-style file endings on Windows - at least temporarily - use:測試
git config --global core.autocrlf false
Then run your installation commands involving git clone
again.ui
To restore Git's behavior later, run git config --global core.autocrlf true
.this