当前位置: 首页 > news >正文

(-aAa-) Linux,预制二进制文件 的 3 种安装方法 (***)

Just 用户指南 https://just.systems/man/zh/%E9%

方法一:

export PATH=$PATH:/path-to-just
source ~/.bashrc

方法二:自行制作 appimage

## 参考:指向 AppRun # 在 Shell 搜索可执行文件的路径中添加`~/bin` # 这一行应该被添加到你的 Shell 初始化文件中,e.g. `~/.bashrc` 或者 `~/.zshrc`: export PATH="$PATH:$HOME/bin"

方法三: ​​预制二进制文件​​ ************

> https://just.systems/man/zh/%E9%

Linux、MacOS 和 Windows 的预制二进制文件可以在 ​​发布页​​ 上找到。

你也可以在 Linux、MacOS 或 Windows 上使用下面的命令来下载最新的版本,只需将 ​​DEST​​ 替换为你想安装 ​​just​​ 的目录即可:

curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to DEST

例如,安装 ​​just​​ 到 ​​~/bin​​ 目录:

# 创建 ~/bin mkdir -p ~/bin # 下载并解压 just 到 ~/bin/just curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/bin # 在 Shell 搜索可执行文件的路径中添加`~/bin` # 这一行应该被添加到你的 Shell 初始化文件中,e.g. `~/.bashrc` 或者 `~/.zshrc`: export PATH="$PATH:$HOME/bin" # 现在 just 应该就可以执行了 just --help

> https://just.systems/install.sh

#!/usr/bin/env bash set -eu # Check pipefail support in a subshell, ignore if unsupported # shellcheck disable=SC3040 (set -o pipefail 2> /dev/null) && set -o pipefail help() { cat <<'EOF' Install a binary release of a just hosted on GitHub USAGE: install.sh [options] FLAGS: -h, --help Display this message -f, --force Force overwriting an existing binary OPTIONS: --tag TAG Tag (version) of the crate to install, defaults to latest release --to LOCATION Where to install the binary [default: ~/bin] --target TARGET EOF } crate=just url=https://github.com/casey/just releases=$url/releases say() { echo "install: $*" >&2 } err() { if [ -n "${td-}" ]; then rm -rf "$td" fi say "error: $*" exit 1 } need() { if ! command -v "$1" > /dev/null 2>&1; then err "need $1 (command not found)" fi } download() { url="$1" output="$2" args=() if [ -n "${GITHUB_TOKEN+x}" ]; then args+=(--header "Authorization: Bearer $GITHUB_TOKEN") fi if command -v curl > /dev/null; then curl --proto =https --tlsv1.2 -sSfL ${args[@]+"${args[@]}"} "$url" -o"$output" else wget --https-only --secure-protocol=TLSv1_2 --quiet ${args[@]+"${args[@]}"} "$url" -O"$output" fi } force=false while test $# -gt 0; do case $1 in --force | -f) force=true ;; --help | -h) help exit 0 ;; --tag) tag=$2 shift ;; --target) target=$2 shift ;; --to) dest=$2 shift ;; *) say "error: unrecognized argument '$1'. Usage:" help exit 1 ;; esac shift done command -v curl > /dev/null 2>&1 || command -v wget > /dev/null 2>&1 || err "need wget or curl (command not found)" need mkdir need mktemp if [ -z "${tag-}" ]; then need grep need cut fi if [ -z "${target-}" ]; then need cut fi if [ -z "${dest-}" ]; then dest="$HOME/bin" fi if [ -z "${tag-}" ]; then tag=$( download https://api.github.com/repos/casey/just/releases/latest - | grep tag_name | cut -d'"' -f4 ) fi if [ -z "${target-}" ]; then # bash compiled with MINGW (e.g. git-bash, used in github windows runners), # unhelpfully includes a version suffix in `uname -s` output, so handle that. # e.g. MINGW64_NT-10-0.19044 kernel=$(uname -s | cut -d- -f1) uname_target="$(uname -m)-$kernel" case $uname_target in aarch64-Linux) target=aarch64-unknown-linux-musl;; arm64-Darwin) target=aarch64-apple-darwin;; armv6l-Linux) target=arm-unknown-linux-musleabihf;; armv7l-Linux) target=armv7-unknown-linux-musleabihf;; loongarch64-Linux) target=loongarch64-unknown-linux-musl;; x86_64-Darwin) target=x86_64-apple-darwin;; x86_64-Linux) target=x86_64-unknown-linux-musl;; x86_64-MINGW64_NT) target=x86_64-pc-windows-msvc;; x86_64-Windows_NT) target=x86_64-pc-windows-msvc;; *) # shellcheck disable=SC2016 err 'Could not determine target from output of `uname -m`-`uname -s`, please use `--target`:' "$uname_target" ;; esac fi case $target in x86_64-pc-windows-msvc) extension=zip; need unzip;; *) extension=tar.gz; need tar;; esac archive="$releases/download/$tag/$crate-$tag-$target.$extension" say "Repository: $url" say "Crate: $crate" say "Tag: $tag" say "Target: $target" say "Destination: $dest" say "Archive: $archive" td=$(mktemp -d || mktemp -d -t tmp) if [ "$extension" = "zip" ]; then download "$archive" "$td/just.zip" unzip -d "$td" "$td/just.zip" else download "$archive" - | tar -C "$td" -xz fi if [ -e "$dest/just" ] && [ "$force" = false ]; then err "\`$dest/just\` already exists" else mkdir -p "$dest" cp "$td/just" "$dest/just" chmod 755 "$dest/just" fi rm -rf "$td"
http://www.jsqmd.com/news/599056/

相关文章:

  • CLIP-GmP-ViT-L-14真实效果:多语言文本+图像跨模态检索演示
  • 别再只会Ctrl+C/V了!用WPS JS宏实现单元格的“智能复制”,效率翻倍
  • Whisper-large-v3在智能办公中的应用:会议记录自动化系统
  • MongoBleed(CVE-2025-14847):影响超8万台MongoDB服务器的高危内存泄露漏洞已在野活跃利用
  • 3步掌握3dsconv:从格式转换到自动化管理
  • 垂直行业落地:医疗场景下的 Agent 诊断辅助系统架构拆解
  • Bootstrap5 轮播详解
  • 用Proteus 8.10和AD21复刻一个51单片机光照报警器(附完整代码和避坑指南)
  • Jina AI 搜索底座模型生产部署:从选型到优化的全链路实战
  • C++ RAII 模式的工程价值
  • Linux系统编程 - 线程thread
  • C++的std--strong_ordering三路比较结果与排序算法的稳定性保证
  • 老旧Mac升级指南:使用OpenCore Legacy Patcher实现系统兼容性突破
  • k8s底层 containerd 容器,而非docker
  • 告别虚拟机!用 MSYS2 在 Windows 原生环境搭建 MRtrix3 神经影像处理工作流
  • Python 3 JSON:深度解析与应用指南
  • AI辅助养龙虾:利用快马DeepSeek模型构建生长预测与疾病预警系统
  • 【视频异常检测】STPrompt:当视觉语言模型遇见时空提示,弱监督下的异常定位新范式
  • python terraform
  • Uniapp适配HarmonyOS5实战:从环境配置到条件编译避坑全攻略
  • authentik开源身份认证与管理平台-与 Grafana 集成(12)
  • 避坑指南:ArcGIS道路交叉点分析常见3大错误(附正确工具箱调用方法)
  • 微信聊天记录数据备份与分析工具全攻略:本地存储与隐私保护指南
  • Bandizip 口碑极佳的压缩解压工具
  • Flutter 状态管理:Provider, Bloc, GetX 对比
  • GIS小白必看:5分钟搞定1:100万中国植被数据下载与ArcGIS加载
  • python ansible
  • 【Ultralytics】COCO数据集评估中的KeyError: ‘info‘问题解析与版本兼容性方案
  • 粤嵌GEC6818-学习笔记1-从零搭建嵌入式开发环境
  • GPT-SoVITS实战教学:如何用少量数据训练高质量语音模型