title: 复旦高性能计算 (一) Linux无root权限安装软件:以R为示例 tags: [] id: '631' categories:
推荐使用 [FinalShell](https://www.hostbuf.com/)
或 MobaXterm
或者 PowerShell
也可以用,下面是 PowerShell
优化SSH连接体验的方法
ServerAliveInterval 60
并保存win+R
快捷键powershell
确定ssh userName@server
回车,如 pi@192.168.1.2
或 pi@raspberrypi
mkdir ~/zlliu/bin
mkdir ~/zlliu/lib
mkdir ~/zlliu/include
libsource
:mkdir ~/zlliu/libsource
dev
:mkdir ~/zlliu/dev
libsource
目录libsource
目录:cd ~/zlliu/libsource
[gcc-11.1.0.tar.gz](https://mirrors.ustc.edu.cn/gnu/gcc/gcc-11.1.0/gcc-11.1.0.tar.gz)
:tar -zvxf gcc-11.1.0.tar.gz
gcc-11.1.0
目录,创建 gcc-build
目录:cd gcc-11.1.0 && mkdir gcc-build
./contrib/download_prerequisites
cd gcc-build && ../configure --prefix=$HOME/zlliu/dev/gcc11 --enable-checking=release --enable-languages=c,c++,fortran,d,go,lto,objc,obj-c++ --disable-multilib
make -j8 && make install
ln -s /home/rqzhang/zlliu/dev/gcc11/lib64/lib* ~/zlliu/lib/
ln -s /home/rqzhang/zlliu/dev/gcc11/bin/* ~/zlliu/bin/
ln -s /home/rqzhang/zlliu/dev/gcc11/include/* ~/zlliu/include/
修改 ~/.bash_profile
文件,添加如下内容:
Makefile编译选项CC与CXX/CPPFLAGS、CFLAGS与CXXFLAGS/LDFLAGS
export PATH=$HOME/zlliu/bin:$HOME/zlliu/lib:$HOME/zlliu/include:$PATH:$HOME/.local/bin:$HOME/bin
export LD_LIBRARY_PATH=$HOME/zlliu/lib/
export LIBRARY_PATH=$HOME/zlliu/lib/
export CPLUS_INCLUDE_PATH=$HOME/zlliu/include/
export C_INCLUDE_PATH=$HOME/zlliu/include/
export BOOST_ROOT=$HOME/zlliu/dev/boost
export CC=$HOME/zlliu/bin/gcc
export CXX=$HOME/zlliu/bin/g++
export FC=$HOME/zlliu/bin/gfortran
export CXXFLAGS="-ggdb -pipe -Wall -pedantic -I/home/rqzhang/zlliu/include"
export CPPFLAGS='-I/home/rqzhang/zlliu/include'
export LDFLAGS='-L/home/rqzhang/zlliu/lib -Wl,-R/home/rqzhang/zlliu/lib'
激活配置:source .bash_profile
测试是否成功:gcc --version
../`configure`
--prefix=$HOME/zlliu/dev/r4 --enable-R-shlib --with-x=no
--with-cairo
make -j8 && make install
ln -s /home/rqzhang/zlliu/dev/r4/bin/* ~/zlliu/bin/
ln -s /home/rqzhang/zlliu/dev/`r4`/lib64/R/lib/lib* ~/zlliu/lib/
R --version
config.site
文件nano -K ../**config.site**
CPPFLAGS='-I/es01/paratera/sce2622/include'
LDFLAGS='-L/es01/paratera/sce2622/lib'
tar -zxvf readline-master.tar.gz
./configure --prefix=$HOME/dev/readline
make -j8 && make install
ln -s /es01/paratera/sce2622/dev/readline/lib/lib* ~/lib/
ln -s /es01/paratera/sce2622/dev/readline/include/* ~/include/
make && make install PREFIX=$HOME/dev/bzip2
ln -s /es01/paratera/sce2622/dev/bzip2/lib/lib* ~/lib/
ln -s /es01/paratera/sce2622/dev/bzip2/bin/* ~/bin/
ln -s /es01/paratera/sce2622/dev/bzip2/include/* ~/include/
whereis openssl
./configure --with-ssl --prefix=$HOME/dev/curl
memset@@GLIBC_2.2.5' in read-only section
.text'#! /bin/bash
read path
if [ -z $path ]
then
echo "please enter scan path"
exit
fi
for file in $(find $path -type l)
do
if [ ! -e $file ]
then
echo "rm $file"
rm -f $file
fi
done