Termux에 Gemini CLI를 설치하는 방법
hackernews
|
|
💼 비즈니스
#cli
#gemini
#termux
#tip
#설치
#팁
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
The guide provides step-by-step instructions for installing the Gemini CLI interface within Termux, enabling users to access Google's AI assistant directly from their Android terminal. This installation process allows developers and technical users to leverage Gemini's conversational capabilities through a command-line interface on mobile devices. The tutorial simplifies the setup process, making it accessible even for those with limited experience in Linux environments on Android.
본문
[Sitemap](https://medium.com/sitemap/sitemap.xml) [Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------) Sign up [Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40ROCKYSHARAF%2Fhow-to-install-gemini-cli-on-termux-bypassing-the-native-build-error-ccfa59b80be8&source=post_page---top_nav_layout_nav-----------------------global_nav------------------) [Medium Logo](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------) Get app [](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------) [Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------) Sign up [Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40ROCKYSHARAF%2Fhow-to-install-gemini-cli-on-termux-bypassing-the-native-build-error-ccfa59b80be8&source=post_page---top_nav_layout_nav-----------------------global_nav------------------)  # How to Install Gemini CLI on Termux: Bypassing the Native Build Error [](https://medium.com/@ROCKYSHARAF?source=post_page---byline--ccfa59b80be8---------------------------------------) [Rocky](https://medium.com/@ROCKYSHARAF?source=post_page---byline--ccfa59b80be8---------------------------------------) 4 min read · Feb 17, 2026 [](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fvote%2Fp%2Fccfa59b80be8&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40ROCKYSHARAF%2Fhow-to-install-gemini-cli-on-termux-bypassing-the-native-build-error-ccfa59b80be8&user=Rocky&userId=ff43cf7437d9&source=---header_actions--ccfa59b80be8---------------------clap_footer------------------) -- [](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2Fccfa59b80be8&operation=register&redirect=https%3A%2F%2Fmedium.com%2F%40ROCKYSHARAF%2Fhow-to-install-gemini-cli-on-termux-bypassing-the-native-build-error-ccfa59b80be8&source=---header_actions--ccfa59b80be8---------------------bookmark_footer------------------) Listen Share Press enter or click to view image in full size  If you’ve tried to get the Google Gemini CLI running on your Android device via Termux, you’ve likely hit a wall. Whether it’s a silent exit or a cryptic error regarding `android_ndk_path`, the issue usually boils down to one thing: **native module compilation.** In this guide, I’ll show you why the standard installation fails and how to bypass it using the `--ignore-scripts` flag to get Gemini running in seconds. ## The Problem: The “Android NDK” Trap When you run a standard `npm install` for the Gemini CLI, the process attempts to compile `tree-sitter-bash`. This module expects a full Android NDK (Native Development Kit) path to be defined in its configuration. Since Termux provides a Linux-like environment but is **not** a full Android development SDK, the build fails with an “Undefined variable” error. ## The Solution: A Step-by-Step Guide ## 1. Prepare Your Environment First, ensure your package lists are updated and you have Node.js installed. Bash ``` pkg update && pkg upgrade pkg install nodejs ``` ## 2. Install Build Dependencies Even though we will eventually skip some scripts, having the basic build tools (Python and Clang) ensures that other parts of the Node ecosystem function correctly within Termux. Bash ``` pkg install python make clang ``` ## 3. The “Secret Sauce” Installation The key to success is the `--ignore-scripts` flag. This tells `npm` to skip the post-install compilation of native modules. While `tree-sitter` is used for advanced code parsing, it is not strictly required for the core Gemini chat functionality. **Run this command:** Bash ``` npm install -g @google/gemini-cli --ignore-scripts ``` ## 4. Launch and Authenticate Once installed, launch the CLI. On your first run, it will prompt you to authenticate. ## Get Rocky’s stories in your inbox Join Medium for free to get updates from this writer. Subscribe Subscribe Remember me for faster sign in Bash ``` gemini ``` * Select **“Login with Google”**. * A URL will be provided; copy and paste it into your mobile browser. * Log in, copy the authorization code, and paste it back into Termux. ## If you’ve been banging your head against the wall trying to get this to work, you aren’t alone. Most users go through a specific “cycle of failure” before finding the right command. Here is why the common methods fall short on Android: ## 1. The “Quick Start” Failure **Attempt:** `npx @google/gemini-cli` **
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유