{"id":13726863,"url":"https://github.com/yao-pkg/pkg-binaries","last_synced_at":"2025-05-07T22:30:34.566Z","repository":{"id":52871542,"uuid":"161341410","full_name":"yao-pkg/pkg-binaries","owner":"yao-pkg","description":"Collection of pkg nodejs binaries that are not supported by pkg","archived":false,"fork":false,"pushed_at":"2025-04-30T14:53:09.000Z","size":203233,"stargazers_count":91,"open_issues_count":3,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-07T19:50:50.092Z","etag":null,"topics":["aarch64","alpine","arm32","arm32v6","arm32v7","arm64","armv7","armv7l","binaries","docker","linux","nexe","node","nodejs","pkg","raspberry","utils","zeit"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yao-pkg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"robertsLando","patreon":"user?u=16906849","custom":"paypal.me/daniellando"}},"created_at":"2018-12-11T13:53:05.000Z","updated_at":"2025-04-30T14:53:13.000Z","dependencies_parsed_at":"2023-02-14T06:01:10.566Z","dependency_job_id":"8011610a-396b-459b-b585-9c7ec63a0492","html_url":"https://github.com/yao-pkg/pkg-binaries","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yao-pkg%2Fpkg-binaries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yao-pkg%2Fpkg-binaries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yao-pkg%2Fpkg-binaries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yao-pkg%2Fpkg-binaries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yao-pkg","download_url":"https://codeload.github.com/yao-pkg/pkg-binaries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965087,"owners_count":21832819,"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":["aarch64","alpine","arm32","arm32v6","arm32v7","arm64","armv7","armv7l","binaries","docker","linux","nexe","node","nodejs","pkg","raspberry","utils","zeit"],"created_at":"2024-08-03T01:03:28.166Z","updated_at":"2025-05-07T22:30:34.285Z","avatar_url":"https://github.com/yao-pkg.png","language":"Shell","funding_links":["https://github.com/sponsors/robertsLando","https://patreon.com/user?u=16906849","paypal.me/daniellando","https://www.buymeacoffee.com/MVg9wc2HE","https://paypal.me/daniellando","https://www.patreon.com/bePatron?u=16906849"],"categories":["Shell"],"sub_categories":[],"readme":"# Pkg Binaries\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/MVg9wc2HE \"Buy Me A Coffee\") [\u003cimg style=\"background:#ccc;border-radius:10px\" alt=\"PayPal\" src=\"https://www.paypalobjects.com/paypal-ui/logos/svg/paypal-color.svg\" alt=\"PayPal\" width=\"200\" height=\"40px\" /\u003e](https://paypal.me/daniellando) [![Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?u=16906849)\n\nCollection of NodeJS precompiled binaries to use with [pkg][207006e9]. Please submit a pull request if you have others that are not present here.\n\n**ALL BINARIES HAVE BEEN MOVED TO RELEASES ASSETS. YOU WILL FIND ALL BINARIES [HERE](https://github.com/robertsLando/pkg-binaries/releases)**\n\n## Usage\n\nDownload the binary inside pkg cache folder before compiling your application.\n\nExample with `armv7` `node v16.16.0` `linux`:\n\n```bash\nCACHE=~/.pkg-cache/custom #custom cache folder\nmkdir -p $CACHE\nexport PKG_CACHE_PATH=$CACHE\nexport PKG_IGNORE_TAG=true # prevents pkg-fetch to add a tag folder\ncurl https://github.com/yao-pkg/pkg-binaries/releases/download/node16/built-v16.16.0-linux-armv7 -LO $CACHE/built-v16.16.0-linux-armv7 # download the binary, be sure it is prefixewd with built-, otherwise it will not work\nnpx pkg -t node16-linux-armv7 . # compile your application\n```\n\n\u003e **ATTENTION**\n\nOnce you have placed the file in `.pkg-cache` folder check that the output of `file` command gives you the correct interpreter:\n\n```bash\npi@NanoPi-NEO-Plus2:~/.pkg-cache/v2.6$ file fetched-v8.11.3-linux-arm64\nfetched-v8.11.3-linux-arm64: ELF 64-bit LSB shared object, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-, for GNU/Linux 3.7.0, BuildID[sha1]=02bf3444ecc520c4da40e89cbfbf6831e3a205ea, not stripped\n```\n\nSometimes when using `wget` it could be downloaded as `HTML text` file and it wouldn't work.\n\n## Utils\n\nIn utils folder you will find a bash script `package.sh` that I have created to package my nodejs application.\n\nCopy the script in your app directory and edit it with your appName and the destination folder of the pkg compiled output.\n\n```bash\n# EDIT THIS WITH YOUR VALUES\nAPP=\"appName\"\nPKG_FOLDER=\"pkg\"\n```\n\nIt also automatically scan `node_modules` folder and adds required `.node` files that pkg is not able to package.\n\nYou will find all your files inside the destination folder and they will be also packaged inside a .zip file with appName and version choosed.\n\nIf you want to make things more easy add a script in your `package.json` file:\n\n```json\n\n\"scripts\": {\n  \"start\": \"sudo node ./bin/www\", //default to start the application\n  \"package\": \"sudo chmod +x package.sh \u0026\u0026 ./package.sh\"\n}\n\n```\n\nThan simply run `npm run package` to start the script\n\n## Compilation guide\n\n### Using Docker\n\nThis allows to compile nodejs pkg binary for `arm32` (armv7l, armv6) and `arm64` archs from a `x86_64`.\n\nSteps\n\n```bash\n# Clone this repo\ngit clone https://github.com/robertsLando/pkg-binaries.git\ncd pkg-binaries\n# Build the required binary\nchmod +x build.sh\n./build.sh\n# Follow build steps and wait for nodejs to be compiled (WILL TAKE AROUND 24 HOURS!)\n```\n\n### Manually\n\nThis requires to run commands in a CPU with the required build ARCH\n\nHere is a guide to manually compile a nodejs binary from source.\nUsually pkg automatically compiles this binary if it doesn't find them in his resources but this process may fail and this is how to do it by your self. In this example I'm compiling nodejs 8 LTS using a device with Linux with architecture arm64 (to check the information about your device run the comand `uname -a`).\n\n1. Install required build tools:\n\n    `sudo apt-get install build-essential`\n\n2. Than clone node:\n\n    `git clone https://github.com/nodejs/node.git`\n\n3. Checkout to the desired version:\n\n    `cd node`\n    `git checkout v8.11.3`\n\n4. Create the patch file inside the node dir and paste the content from the patch file you find on pkg-fetch github inside [patch][a9bdf3ee] directory (\u003chttps://raw.githubusercontent.com/zeit/pkg-fetch/master/patches/node.v8.11.3.cpp.patch)\u003e\n\n    `sudo nano node.v8.11.3.cpp.patch` (Ctrl+Maiusc+V - Ctrl+X - Y)\n\n    `git apply node.v8.11.3.cpp.patch`\n\n    `./configure`\n\n    `make` (this takes many minutes, even hours in some devices)\n\n5. Finally copy the binary:\n\n    `cp node ~/.pkg-cache/v2.6/fetched-v8.11.3-linux-arm64`\n\n[207006e9]: https://github.com/zeit/pkg \"Zeit Pkg\"\n\n[a9bdf3ee]: https://github.com/zeit/pkg-fetch/tree/master/patches \"Patch\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyao-pkg%2Fpkg-binaries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyao-pkg%2Fpkg-binaries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyao-pkg%2Fpkg-binaries/lists"}