{"id":18071888,"url":"https://github.com/innerlee/setup","last_synced_at":"2025-04-05T11:09:55.847Z","repository":{"id":30946028,"uuid":"212524697","full_name":"innerlee/setup","owner":"innerlee","description":"Setup a new machine without sudo!","archived":false,"fork":false,"pushed_at":"2022-02-14T16:36:18.000Z","size":275,"stargazers_count":445,"open_issues_count":8,"forks_count":78,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T10:07:52.760Z","etag":null,"topics":["boost","gcc","hdf5","imagemagick","julia","libjpeg","machine","no-sudo","non-root","setup","tmux","zsh","zshplugin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/innerlee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-03T07:53:48.000Z","updated_at":"2025-03-11T06:33:29.000Z","dependencies_parsed_at":"2022-07-22T01:17:19.382Z","dependency_job_id":null,"html_url":"https://github.com/innerlee/setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innerlee%2Fsetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innerlee%2Fsetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innerlee%2Fsetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/innerlee%2Fsetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/innerlee","download_url":"https://codeload.github.com/innerlee/setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boost","gcc","hdf5","imagemagick","julia","libjpeg","machine","no-sudo","non-root","setup","tmux","zsh","zshplugin"],"created_at":"2024-10-31T09:17:38.037Z","updated_at":"2025-04-05T11:09:55.826Z","avatar_url":"https://github.com/innerlee.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setup a New Machine without `sudo`!\n\nDownload, compile and install commonly used software to a custom path.\n\n\u003cdiv style=\"align:center\"\u003e\n    \u003cimg src=\"https://img.devrant.com/devrant/rant/r_54040_zGEQB.jpg\" height=128 /\u003e\n\u003c!--     \u003cimg src=\"https://www.leadingagile.com/wp-content/uploads/2017/03/works-on-my-machine.jpg\" height=128 /\u003e --\u003e\n\u003c/div\u003e\n\n## Term of Usage\n\n-  Star the repo before clone\n-  File issue if it does not work\n-  Unstar if you feel it is unmaintained\n\n## Usage\n\n```bash\n# configure setup path, you can put them into your `.bashrc` or `.zshrc`\nexport ZZROOT=$HOME/app\nexport PATH=$ZZROOT/bin:$PATH\nexport LD_LIBRARY_PATH=$ZZROOT/lib:$ZZROOT/lib64:$LD_LIBRARY_PATH\n\n# e.g. install git\nsh zzgit.sh\n```\n\n**NOTE:**\nIf the download speed of the machine is too slow, you can put the `git.tar.gz` (using git as an example) into `$ZZROOT/downloads` before running the script.\nFor the download link, check the `DOWNLOADURL` variable in its script; for the exact name of the software, check the `NAME` variable.\n\n**NOTE2:**\nIf you compile from source, please make sure that they are compiled using the same gcc version!\n\n**NOTE3:**\nIf you **DO** have root privilate on your machine/server, then basic tools such as `libtool`, `ccache`, `git`, etc. might be better installed by OS's package manager. Such as `apt` in Ubuntu. Only install software that are not available on the OS's packaging system.\n\n## Supported Softwares\n\nVerified on Ubuntu 18.04\n\nUpdated: July 8, 2020\n\n### libs\n\n-   [boost](https://www.boost.org/) (1.71.0)\n    -   install script: [`./zzboost.sh`](zzboost.sh)\n    -   post install: `export BOOST_ROOT=$ZZROOT`\n-   [gmp](https://gmplib.org/) (6.1.2)\n    -   install script: [`./zzgmp.sh`](zzgmp.sh)\n-   [mpc](https://ftp.gnu.org/gnu/mpc/) (1.1.0)\n    -   depends on: `gmp`, `mpfr`\n    -   install script: [`./zzmpc.sh`](zzmpc.sh)\n-   [mpfr](https://www.mpfr.org/) (4.0.2)\n    -   depends on: `gmp`\n    -   install script: [`./zzmpfr.sh`](zzmpfr.sh)\n-   [nasm](https://www.nasm.us/) (2.14.02)\n    -   install script: [`./zznasm.sh`](zznasm.sh)\n-   [yasm](https://yasm.tortall.net/) (1.3.0)\n    -   install script: [`./zzyasm.sh`](zzyasm.sh)\n-   [ncurses](https://invisible-island.net/ncurses/) (6.1)\n    -   install script: [`./zzncurses.sh`](zzncurses.sh)\n    -   post install: `export TERMINFO=$ZZROOT/share/terminfo`\n-   [freetype](https://www.freetype.org/) (2.10.1)\n    -   install script: [`./zzfreetype.sh`](zzfreetype.sh)\n-   [opencv](https://opencv.org/) (4.1.2)\n    -   note: this config is designed for [denseflow](https://github.com/innerlee/denseflow).\n        Please modify the cmake flags for your needs.\n    -   depends on: `ccache`, `ffmpeg`\n    -   install script: [`./zzopencv.sh`](zzopencv.sh)\n    -   post install: `export OpenCV_DIR=$ZZROOT`\n-   [openssl](https://www.openssl.org/) (1.1.1d)\n    -   note: both `PREFIX` and `OPENSSLDIR` are set to `$ZZROOT/ssl`\n    -   install script: [`./zzopenssl.sh`](zzopenssl.sh)\n    -   post install: for cmake `export OPENSSL_ROOT_DIR=$ZZROOT/ssl`, and for configure `--with-ssl=$ZZROOT/ssl` (the flag may be different in different configure scripts)\n-   [libcurl](https://curl.haxx.se/libcurl/) (7.67.0)\n    -   depends on: `autoconf`, `automake`, `libtool`, `m4`, `nroff`, `perl`, `openssl`\n    -   install script: [`./zzlibcurl.sh`](zzlibcurl.sh)\n-   [libevent](https://libevent.org/) (2.1.11)\n    -   install script: [`./zzlibevent.sh`](zzlibevent.sh)\n-   [libvpx](https://www.webmproject.org/code/) (master)\n    -   install script: [`./zzlibvpx.sh`](zzlibvpx.sh)\n-   [libx264](https://www.videolan.org/developers/x264.html) (master)\n    -   install script: [`./zzlibx264.sh`](zzlibx264.sh)\n-   [libx265](http://x265.org/) (3.2.1)\n    -   install script: [`./zzlibx265.sh`](zzlibx265.sh)\n-   [libz](https://www.zlib.net/) (1.2.11)\n    -   install script: [`./zzlibz.sh`](zzlibz.sh)\n-   [libzstd](https://facebook.github.io/zstd/) (1.4.4)\n    -   install script: [`./zzlibzstd.sh`](zzlibzstd.sh)\n-   [libzip](https://libzip.org/) (1.5.2)\n    -   install script: [`./zzlibzip.sh`](zzlibzip.sh)\n-   [libtool](https://www.gnu.org/software/libtool/) (2.4.6)\n    -   install script: [`./zzlibtool.sh`](zzlibtool.sh)\n-   [libjpeg](http://www.ijg.org/) (6b)\n    -   depends on: `libtool`\n    -   install script: [`./zzlibjpeg.sh`](zzlibjpeg.sh)\n-   [libjpeg-turbo](https://libjpeg-turbo.org/) (2.0.3)\n    -   depends on: `nasm`, `yasm`\n    -   install script: [`./zzlibjpeg-turbo.sh`](zzlibjpeg-turbo.sh)\n-   [libpng](http://www.libpng.org/pub/png/libpng.html) (1.6.37)\n    -   install script: [`./zzlibpng.sh`](zzlibpng.sh)\n-   [libtiff](http://www.simplesystems.org/libtiff/) (4.1.0)\n    -   install script: [`./zzlibtiff.sh`](zzlibtiff.sh)\n-   [libwebp](https://developers.google.com/speed/webp/download) (1.0.3)\n    -   install script: [`./zzlibwebp.sh`](zzlibwebp.sh)\n-   [giflib](http://giflib.sourceforge.net/) (5.2.1)\n    -   install script: [`./zzgiflib.sh`](zzgiflib.sh)\n-   [libopenjp2](https://www.openjpeg.org/) (2.3.1)\n    -   install script: [`./zzlibopenjp2.sh`](zzlibopenjp2.sh)\n\n### tools\n\n-   [autoconf](https://www.gnu.org/software/autoconf/) (2.69)\n    -   depends on: `m4`, `perl`\n    -   install script: [`./zzautoconf.sh`](zzautoconf.sh)\n-   [ccache](https://ccache.dev/) (3.7.6)\n    -   install script: [`./zzccache.sh`](zzccache.sh)\n    -   post install: customize cache dir by `export CCACHE_DIR=~/.ccache` to avoid permission issue\n-   [cmake](https://cmake.org/) (3.16.0)\n    -   install script: [`./zzcmake.sh`](zzcmake.sh)\n-   [anaconda3](https://www.anaconda.com/) (2019.10)\n    -   note: anaconda is installed default on `$HOME/anaconda3`\n    -   install script: [`./zzconda.sh`](zzconda.sh)\n    -   post install: `export PATH=$HOME/anaconda3/bin:$PATH`\n-   [ffmpeg](https://www.ffmpeg.org/) (4.2.1)\n    -   depends on: `nasm`, `yasm`, `libx264`, `libx265`, `libvpx`\n    -   install script: [`./zzffmpeg.sh`](zzffmpeg.sh)\n-   [gcc](https://gcc.gnu.org/) (7.5.0)\n    -   note: CUDA 10 support up to gcc 7, CUDA 9 support up to gcc 5.\n    -   depends on: `gmp`, `mpfr`, `mpc`\n    -   install script: [`./zzgcc.sh`](zzgcc.sh)\n-   [git](https://github.com/git/git) (2.24.0)\n    -   depends on: `libcurl`, `libz`\n    -   install script: [`./zzgit.sh`](zzgit.sh)\n-   [hdf5](https://www.hdfgroup.org/solutions/hdf5/) (1.10.5)\n    -   install script: [`./zzhdf5.sh`](zzhdf5.sh)\n-   [htop](https://hisham.hm/htop/) (2.2.0)\n    -   depends on: `ncurses`\n    -   install script: [`./zzhtop.sh`](zzhtop.sh)\n-   [julia](https://julialang.org/) (1.3.0)\n    -   install script: [`./zzjulia.sh`](zzjulia.sh)\n-   [autojump](https://github.com/wting/autojump) (master)\n    -   install script: [`./zzautojump.sh`](zzautojump.sh)\n    -   post install: put [lines of configs](.zshrc#L17) in `.zshrc`\n-   [imagemagick](https://imagemagick.org/) (latest)\n    -   depends on: `freetype`, `libjpeg-turbo`, `libpng`, `libtool`, `perl`\n    -   install script: [`./zzimagemagick.sh`](zzimagemagick.sh)\n-   [nmon](http://nmon.sourceforge.net/pmwiki.php) (16j)\n    -   depends on: `ncurses`\n    -   install script: [`./zznmon.sh`](zznmon.sh)\n-   [zsh](http://zsh.sourceforge.net/) (5.7.1)\n    -   depends on: `ncurses`\n    -   install script: [`./zzzsh.sh`](zzzsh.sh)\n    -   post install: to set `zsh` as default shell without root, add `exec $ZZROOT/bin/zsh -l` to `.bashrc` ([example](https://github.com/innerlee/setup/blob/master/.bashrc))\n-   [ohmyzsh](https://github.com/ohmyzsh/ohmyzsh) (latest)\n    -   depends on: `zsh`\n    -   install script: [`./zzohmyzsh.sh`](zzohmyzsh.sh)\n-   [perl](https://www.perl.org/) (5.30.1)\n    -   install script: [`./zzperl.sh`](zzperl.sh)\n-   [ruby](https://www.ruby-lang.org/en/) (2.7.0)\n    -   depends on: `openssl (with libssl installed)`\n    -   install script: [`./zzruby.sh`](zzruby.sh)\n-   [tmux](https://github.com/tmux/tmux) (3.0a)\n    -   depends on: `libevent`\n    -   install script: [`./zztmux.sh`](zztmux.sh)\n-   [unrar](https://www.rarlab.com/rar_add.htm) (5.8.4)\n    -   install script: [`./zzunrar.sh`](zzunrar.sh)\n-   [vmtouch](https://hoytech.com/vmtouch/) (1.3.1)\n    -   install script: [`./zzvmtouch.sh`](zzvmtouch.sh)\n\n### zz scripts \u0026 customized tools\n\n-   [sshpass](https://github.com/innerlee/sshpass) (support 2-step verification)\n    -   depends on: `oathtool`, `autoconf`\n    -   install script: [`./zzsshpass.sh`](zzsshpass.sh)\n-   [denseflow](https://github.com/open-mmlab/denseflow) (extract frames, optical flow, resize, and more!)\n    -   depends on: `boost`, `opencv`, `cmake`\n    -   install script: [`./zzdenseflow.sh`](zzdenseflow.sh)\n-   [wslssh.bat](wslssh.bat) (use ssh of wsl in win10, no installation, `.bat` script as is)\n    -   depends on: `sshpass`\n    -   you can set `vscode` ssh path to this `wslssh.bat`, work together with `sshpass` (installed in wsl)\n-   [sshkey.sh](sshkey.sh) (gen an ssh key)\n    -   run script: `./sshkey.sh`\n-   [zshplugin.sh](zshplugin.sh) (completions, autosuggestions, syntax-highlighting)\n    -   depends on: `git`\n    -   install script: [`./zshplugin.sh`](zshplugin.sh)\n    -   post install: put [lines of configs](.zshrc#L6-L15) in `.zshrc`\n-   [nordtmux.sh](nordtmux.sh) (nord theme for tmux)\n    -   depends on: `git`, `tmux`\n    -   install script: [`./nordtmux.sh`](nordtmux.sh)\n-   [dircolor.sh](dircolor.sh) (nord theme for zsh)\n    -   install script: [`./dircolor.sh`](dircolor.sh)\n    -   post install: put [lines of configs](.zshrc#L1-L2) in `.zshrc`\n\n### zz configures\n\n-   [`.tmux.conf`](.tmux.conf) (tmux configuration)\n-   [`.zshrc`](.zshrc) (zsh configuration)\n-   [`.netrc`](.netrc) (lftp password-less configuration)\n-   [`.ssh/config`](.ssh/config) (suppress git clone warnings)\n-   [`.lftp/rc`](.lftp/rc) (suppress lftp ssl warning)\n\n### misc\n\n- [opengl on remote machine](https://www.scm.com/doc/Installation/Remote_GUI.html)\n- useful Julia packages: ArgParse Glob Images FileIO StatsBase Shell UnicodePlots PyCall PyPlot Plots ImageFiltering ImageMagick Interpolations Revise OhMyREPL DataFrames ProgressMeter JLD2 Distances ImageTransformations JuMP HDF5 ImageInTerminal ImageView DataStructures JSON3 JuliaFormatter NNlib\n- free JuMP solvers: Cbc Clp COSMO CSDP ECOS GLPK Juniper OSQP ProxSDP SCS SDPA\n- good reference: http://www.linuxfromscratch.org/lfs/view/development/index.html and http://www.linuxfromscratch.org/blfs/view/svn/index.html and https://pkgs.org/\n- [CUDA arch and CUDA gencode list](https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/)\n- Instruction on how to load jpeg faster. https://github.com/innerlee/cvbenchmark#setup\n- View image in terminal: [viu](https://github.com/atanunq/viu) and [tiv](https://github.com/stefanhaustein/TerminalImageViewer)\n- image lossless optimization: jpegtran optipng\n- image lossy optimization: pngquant\n- ffmpeg tricks\n  * silent: `ffmpeg -hide_banner -loglevel panic`\n  * get resolution `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 input.mp4`\n  * count frames `ffmpeg -i input.mp4 -map 0:v:0 -c copy -f null - 2\u003e\u00261 | grep frame`\n  * remove duplicated frames `ffmpeg -i input.mp4 -vf mpdecimate -vsync vfr out.mp4`\n- `rsync -avzh --exclude='*.jpg' --exclude='*.png' lizz@lizz-dev:data .`\n- cool rust tools:\n  * bottom https://github.com/ClementTsang/bottom\n  * ripgrep https://github.com/BurntSushi/ripgrep\n  * fd https://github.com/sharkdp/fd\n  * dust https://github.com/bootandy/dust\n  * zenith https://github.com/bvaisvil/zenith\n\n### faq\n\n- **Q**: My boost segfaluts :( \u003cbr/\u003e\n**A**: Make sure they the boost are comipiled and linked using the same gcc/g++ version\n\n- **Q**: `Cert verify failed: BADCERT_NOT_TRUSTED` :( \u003cbr/\u003e\n**A**: Try `export SSL_CERT_DIR=/etc/ssl/certs`\n\n- **Q**: `warning: templates not found in /workspace/destdir/share/git-core/templates` :( \u003cbr/\u003e\n**A**: Add the following to `$HOME/.gitconfig`\n```\n[init]\n        templatedir = $HOME/app/share/git-core/templates\n```\n\n- **Q**: `fatal: unable to find remote helper for 'https'` :( \u003cbr/\u003e\n**A**: Add the following to `$HOME/.zshrc` (or `.bashrc` of course)\n```\nexport GIT_EXEC_PATH=$ZZROOT/libexec/git-core\nexport GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt\n```\n\n- **Q**: `Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.` :( \u003cbr/\u003e\n**A**: Add the following to `$HOME/.zshrc` (or `.bashrc` of course)\n```\nexport GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/\n```\n\n- **Q**: `import pyvips` segfault :( \u003cbr/\u003e\n**A**: Make sure `gstreamer-orc \u003c0.4.30`, `imagemagick \u003c7.0.9`.\n```\nconda install -c conda-forge imagemagick=7.0.8\nconda install -c conda-forge gstreamer-orc=0.4.29\n```\n\n- **Q**: GitError(Code:ECERTIFICATE, Class:SSL, the SSL certificate is invalid: 0x08 - The certificate is not correctly signed by the trusted CA) :( \u003cbr/\u003e\n**A**: Run the following\n```julia\njulia\u003e import LibGit2\njulia\u003e LibGit2.set_ssl_cert_locations(\"/etc/ssl/certs/ca-certificates.crt\")\n```\n\n- **Q**: dotnet error :( \u003cbr/\u003e\n**A**: Add the following to `$HOME/.zshrc` (or `.bashrc` of course)\n```bash\nexport DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true\nexport MSBuildSDKsPath=$DOTNET_ROOT/sdk/3.1.102/Sdks\n```\n\n- **Q**: Install OpenCV: CUDA Version wrong:( \u003cbr/\u003e\n**A**: Add the path of the correct version CUDA to `zzopencv.sh` when runing cmake\n```bash\ncmake   ......\n        -DCUDA_TOOLKIT_ROOT_DIR=/mnt/lustre/share/cuda-9.0/ \\\n        ......\n```\n\n- **Q**: Install Denseflow: OpenCV Version wrong, can't find customized path for opencv:( \u003cbr/\u003e\n**A**: Add the path of the correct version opencv and corresponding cuda version to `zzdenseflow.sh` when runing cmake\n```bash\ncmake -DCMAKE_INSTALL_PREFIX=$ROOTDIR \\\n      -DOpenCV_DIR=$ROOT_DIR/lib64/cmake/opencv4 \\\n      -gencode=arch=compute_61,code=sm_61 \\\n      -DCUDA_TOOLKIT_ROOT_DIR=/mnt/lustre/share/cuda-9.0/ ..\n```\n\n- **Q**: Unzip filenames looks messy when there are unicodes :( \u003cbr/\u003e\n**A**: Specify the encoding of filenames.\n```bash\n$ unzip -h\nUnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.\n  ...\n  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives\n  -I CHARSET  specify a character encoding for UNIX and other archives\n  ...\n\nunzip -O GB18030 gb18030.zip -d target_dir\n```\n\n- **Q**: Get locale warnings :( \u003cbr/\u003e\n**A**: Run\n```bash\nexport LANGUAGE=en_US.UTF-8\nexport LANG=en_US.UTF-8\nexport LC_ALL=en_US.UTF-8\nlocale-gen en_US.UTF-8\nsudo dpkg-reconfigure locales\n```\n\n- **Q**: moov atom not found :( \u003cbr/\u003e\n**A**: Use https://github.com/anthwlock/untrunc to fix it.\n\n\n- **Q**: you must add /ou=globalsign root ca ... :( \u003cbr/\u003e\n**A**: Set env var.\n```bash\nexport SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt\n```\n\n---\n\n### jlinstall\n\n`jlinstall` is another way to install softwares.\nIt uses pre-built binaries so that no compilation is needed.\nThe default install path of `jlinstall` is `JLROOT=$ZZROOT/jl`.\n\n```\nexport ZZROOT=$HOME/app\nexport JLROOT=$ZZROOT/jl\nexport PATH=$ZZROOT/bin:$JLROOT/bin:$PATH\nexport LD_LIBRARY_PATH=$ZZROOT/lib:$ZZROOT/lib64:$JLROOT/lib:$JLROOT/lib64:$LD_LIBRARY_PATH\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnerlee%2Fsetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finnerlee%2Fsetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finnerlee%2Fsetup/lists"}