# 使用 Homebrew, apt 安装 ratfor

查看 ratfor 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:ratfor
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ratfor
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install ratfor
```

  证据: Debian stable package indexes: ratfor from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:ratfor
- **软件包管理器:** Homebrew
- **版本:** 1.07
- **来源摘要:** Rational Fortran
- **主页:** <http://www.dgate.org/ratfor/>
- **最后更新:** 2026-06-14T15:13:45+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ratfor (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.07
## 项目历史与用法

Ratfor, short for Rational FORTRAN, is a preprocessor that translates structured Ratfor source into FORTRAN 77. The maintained Linux Ratfor distribution descends from a public-domain version 1.0 and remains public domain.

### 项目历史

Ratfor became widely known through Brian Kernighan and P. J. Plauger's classic `Software Tools`, where it provided a more structured notation over portable Fortran. The current Linux Ratfor lineage derives from work attributed to Oz, Ken Yap, W. Bauske of IBM, and the Stanford Exploration Project.

The Linux maintainer converted the implementation to ANSI C, added prototypes and GNU Autoconf support, and released it as 1.01 in 2001. Later releases integrated Debian fixes, repaired the string directive, improved FORTRAN 77 data-statement ordering, and addressed buffer overruns through version 1.07 in 2025.

### 采用历史

Ratfor's durable niche is legacy and educational Fortran tooling. The supplied package metadata records packages in Homebrew, Debian, and Ubuntu, while the official project page distributes source tarballs and RPMs.

### 使用方式

A user runs `ratfor` to preprocess Rational FORTRAN into FORTRAN 77, then compiles the generated code with a compatible compiler such as GNU Fortran. It is a translation step rather than a compiler or runtime of its own.

### 为什么软件包爱好者会关心

Ratfor is a compact example of source-to-source portability culture: a structured-language layer from the `Software Tools` tradition kept useful by small maintenance releases and distribution patches decades later.

### 时间线

- 1976: Ratfor was used in the published `Software Tools` text.
- 2001: Linux Ratfor 1.01 converted the source to ANSI C and GNU Autoconf.
- 2015: Version 1.03 incorporated Debian changes and a Debian bug fix.
- 2025: Version 1.07 hardened include processing against buffer overruns.

### Related projects

- GNU Fortran can compile Ratfor's FORTRAN 77 output, and the Stanford Exploration Project is part of the ancestry documented for the maintained public-domain implementation.

### 来源

- <https://dgate.org/cgit.cgi/ratfor.git>
- <https://www.dgate.org/ratfor/>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - ratfor - 1.07-1: normalized package name match | Debian stable package indexes: ratfor from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Rational Fortran preprocessor for Fortran 77 | http://www.dgate.org/ratfor/
- Ubuntu apt - ratfor - 1.05-2: normalized package name match | Ubuntu 24.04 LTS package indexes: ratfor from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Rational Fortran preprocessor for Fortran 77 | http://www.dgate.org/ratfor/


## Combined YAML source

View the package source record on GitHub. [combined/ratfor.yml](https://github.com/mxcl/pkgdb/blob/main/combined/ratfor.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
