0Pricing
Linux Command Line Mastery · درس

البناء من المصدر: configure وmake وmake install

عند عدم توفر حزمة، تعلّم سير عمل البناء التقليدي من المصدر باستخدام configure وmake وmake install، وعلاقته بمديري الحزم.

البناء من المصدر: configure وmake وmake install درس مجاني في Linux Command Line Mastery على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Linux Command Line Mastery، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Linux Command Line Mastery 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

When Packages Are Not Enough

Package managers like apt and dnf cover most needs, but sometimes you must build software from source: a newer version, a missing distro package, or custom compile options.

The Three-Step Dance

Most source projects follow the same ritual:

  • ./configure checks your system
  • make compiles the code
  • make install copies files into place

Getting the Source

Source usually arrives as a compressed tarball, which ties back to the archiving skills you already learned.

tar -xzf hello-2.12.tar.gz
cd hello-2.12

Installing Build Tools

You need a compiler and make. On Debian/Ubuntu the meta-package build-essential provides them.

sudo apt install build-essential

Running configure

./configure probes for libraries and generates a Makefile. The --prefix option chooses where it will install.

./configure --prefix=/usr/local

Compiling with make

make reads the Makefile and compiles. Use -j to parallelize across CPU cores for speed.

make -j4

Installing the Build

make install copies binaries and data into the prefix. Installing to system paths usually needs root.

sudo make install

Handling Missing Dependencies

If configure complains about a missing library, install its -dev package, which provides headers needed for compiling.

sudo apt install libssl-dev

Cleaning Up

make clean removes compiled objects so you can rebuild from scratch.

make clean

Uninstalling Source Builds

Source installs are not tracked by your package manager. Many projects offer make uninstall, or you can install to /usr/local to keep them separate from packaged software.

sudo make uninstall

Source vs Packages

Prefer packages when possible: they handle dependencies and updates. Build from source only when you need control or a version your distro lacks.

Quick Check

Which step actually compiles the program?

Recap

You can build software the classic way:

  • Extract the tarball with tar
  • ./configure --prefix=... sets up the build
  • make -j compiles, sudo make install installs
  • Install -dev packages for missing headers

Reach for source builds only when packages cannot meet your needs.

الأسئلة الشائعة

هل درس «البناء من المصدر: configure وmake وmake install» مجاني؟

نعم — نص درس «البناء من المصدر: configure وmake وmake install» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Linux Command Line Mastery، انتقل إلى CoddyKit PRO. تتضمن دورة Linux Command Line Mastery 4 دروس في المجموع.

ماذا ستتعلم في «البناء من المصدر: configure وmake وmake install»؟

عند عدم توفر حزمة، تعلّم سير عمل البناء التقليدي من المصدر باستخدام configure وmake وmake install، وعلاقته بمديري الحزم. تتمرن على Linux Command Line Mastery مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Linux Command Line Mastery؟

لا تُشترط خبرة سابقة. Linux Command Line Mastery على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «البناء من المصدر: configure وmake وmake install»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Linux Command Line Mastery هذا؟

نعم. كل درس في Linux Command Line Mastery يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. الأرشفة والضغط: `tar` و`gzip` و`bzip2`
  2. إدارة الحزم (Debian/Ubuntu): `apt` و`dpkg`
  3. إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm`
  4. البناء من المصدر: configure وmake وmake install
← العودة إلى Linux Command Line Mastery