markdown aria2c.md

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown aria2c.md相关的知识,希望对你有一定的参考价值。

[aria2c][a]
===========

### [Download](https://github.com/aria2/aria2/releases/latest)


How to build
------------

### Requirements

```bash
sudo apt-get -y install gcc libssl-dev nettle-dev libgmp-dev libssh2-1-dev libc-ares-dev libxml2-dev zlib1g-dev libsqlite3-dev pkg-config libexpat1-dev libxml2-dev libcppunit-dev autoconf automake autotools-dev autopoint libtool
```


### Download

__Lynx__

```bash
lynx "http://bit.ly/aria2clast"
```


__wget__

```bash
wget -O "aria2c.tar.bz2" "https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0.tar.bz2" && tar -xf "aria2c.tar.bz2"
```


__[Releases][last]__


### Extract source from archive

```bash
tar -xf "aria2-1.34.0.tar.bz2"
```

```bash
bash -c "autoreconf -i && ./configure" && make -j 2
```

* * *

aria2 is primarily written in C++. Initially it was written based on C++98/C++03 standard features. We are now migrating aria2 to C++11 standard. The current source code requires C++11 aware compiler. Fo well-known compilers, such as g++ and clang, the `-std=c++11` or `-std=c++0x` flag must be supported.

In order to build aria2 from the source package, you need following development packages (package name may vary depending on the distribution you use):

-   `libgnutls-dev`    _Required for HTTPS, BitTorrent, Checksum support_
-   `nettle-dev`       _Required for BitTorrent, Checksum support_
-   `libgmp-dev`       _Required for BitTorrent_
-   `libssh2-1-dev`    _Required for SFTP support_
-   `libc-ares-dev`    _Required for async DNS support_
-   `libxml2-dev`      _Required for Metalink support_
-   `zlib1g-dev`       _Required for gzip, deflate decoding support in HTTP_
-   `libsqlite3-dev`   _Required for Firefox3/Chromium cookie support_
-   `pkg-config`       _Required to detect installed libraries_


You can use `libgcrypt-dev` instead of `nettle-dev` and `libgmp-dev`:

-   `libgpg-error-dev` _Required for BitTorrent, Checksum support_
-   `libgcrypt-dev`    _Required for BitTorrent, Checksum support_


You can use `libssl-dev` instead of `libgnutls-dev`, `nettle-dev`, `libgmp-dev`, `libgpg-error-dev` and `libgcrypt-dev`:

-   `libssl-dev`       _Required for HTTPS, BitTorrent, Checksum support_


You can use `libexpat1-dev` instead of `libxml2-dev`:

-   ``libexpat1-dev`    _Required for Metalink support_


On Fedora you need the following packages: `gcc`, `gcc-c++`, `kernel-devel`, `libgcrypt-devel`, `libxml2-devel`, `openssl-devel`, `gettext-devel`, `cppunit`.

If you downloaded source code from git repository, you have to install following packages to get autoconf macros:

-   `libxml2-dev`
-   `libcppunit-dev`
-   `autoconf`
-   `automake`
-   `autotools-dev`
-   `autopoint`
-   `libtool`


And run following command to generate configure script and other files necessary to build the program:

```bash
autoreconf -i
```


>   Also you need [Sphinx](http://sphinx-doc.org/) to build man page.

If you are building aria2 for Mac OS X, take a look at the `make-release-os.mk` GNU Make makefile.

The quickest way to build aria2 is first run configure script:

```bash
./configure
```


To build statically linked aria2, use `ARIA2_STATIC=yes` command-line option:

```bash
./configure ARIA2_STATIC=yes
```


After configuration is done, run `make` to compile the program:

```bash
make
```

See `Cross-compiling Windows binary` to create a Windows binary.

See `Cross-compiling Android binary` to create an Android binary.

The configure script checks available libraries and enables as many features as possible except for experimental features not enabled by default.

Since `1.1.0`, aria2 checks the certificate of HTTPS servers by default. If you build with OpenSSL or the recent version of GnuTLS which has `gnutls_certificate_set_x509_system_trust()` function and the library is properly configured to locate the system-wide CA certificates store, aria2 will automatically load those certificates at the startup. If it is not the case, I recommend to supply the path to the CA bundle file. For example, in Debian the path to CA bundle file is `/etc/ssl/certs/ca-certificates.crt` (in ca-certificates package). This may vary depending on your distribution. You can give it to configure script using `--with-ca-bundle option`:

```bash
./configure --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
make
```


Without `--with-ca-bundle` option, you will encounter the error when accessing HTTPS servers because the certificate cannot be verified without CA bundle. In such case, you can specify the CA bundle file using aria2's `--ca-certificate` option.  If you don't have CA bundle file installed, then the last resort is disable the certificate validation using `--check-certificate=false`.

Using the native OSX (__AppleTLS__) and/or Windows (__WinTLS__) implementation will automatically use the system certificate store, so `--with-ca-bundle` is not necessary and will be ignored when using these implementations.

By default, the bash_completion file named `aria2c` is installed to the directory `$prefix/share/doc/aria2/bash_completion`.  To change the install directory of the file, use `--with-bashcompletiondir` option.

After a `make` the executable is located at `src/aria2c`.

aria2 uses CppUnit for automated unit testing. To run the unit test:

```bash
make check
```

* * *

<https://gistlog.co/moalex/41871010c6b01530323f334f97205445>


[a]: https://aria2.github.io/
[last]: http://bit.ly/aria2clast "Releases"

以上是关于markdown aria2c.md的主要内容,如果未能解决你的问题,请参考以下文章

markdown转换为图片

转换rst到markdown总结

markdown [Markdown HowTo]作为Markdown语法的秘籍

python markdown干啥用的

markdown前端渲染

如何用markdown生成目录