Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a virtual machine that I am trying to use. It doesn't seem to have dpkg or apt-get, so I downloaded the source from http://packages.debian.org/sid/dpkg-dev.

If I run ./configure followed by make I get

$ make
make  all-recursive
make[1]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8'
Making all in lib
make[2]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib'
Making all in compat
make[3]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat'
  CC     empty.o
cc1: error: unrecognized command line option "-Wvla"
make[3]: *** [empty.o] Error 1
make[3]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8'
make: *** [all] Error 2

I tried $ ./configure --disable-compiler-warnings $ make to get ...

  CC     trigproc.o
  CC     update.o
  CCLD   dpkg
archives.o: In function `tar_writeback_barrier':
/home/dbadmin/temp/dpkg-1.16.8/src/archives.c:1139: undefined reference to `sync_file_range'
archives.o: In function `fd_writeback_init':
/home/dbadmin/temp/dpkg-1.16.8/src/archives.c:77: undefined reference to `sync_file_range'
collect2: ld returned 1 exit status
make[2]: *** [dpkg] Error 1
make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8'
make: *** [all] Error 2

This is my machine

$ uname -a
Linux server.name.domain.tld 2.6.18-194.26.1.el5xen #1 SMP Fri Oct 29 14:30:03 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

How should I go about getting a functional package manager on this?

Update: $ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

share|improve this question
2  
If there is no apt/dpkg, you probably are not running a Debian derivative. Use the package manager appropriate for your OS. –  jordanm Oct 11 '12 at 23:01
    
@jordanm, how do I find out the OS flavor? I just have ssh access to the virtual machine –  highBandWidth Oct 11 '12 at 23:17
add comment

3 Answers 3

up vote 4 down vote accepted

Dpkg is designed to work on Debian and Debian-like distributions. It can be difficult to compile on other systems, and you wouldn't be able to use it effectively anyway. Also, a kernel version of 2.6.18 is ancient (I smell CentOS 5), only an older version of dpkg has a chance of working.

gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

So you have a Red Hat distribution: RHEL or a repackaging thereof such as CentOS. The basic package manipulation tool (the equivalent of dpkg) on Red Hat distributions is rpm. The high-level package manipulation tool (the equivalent of apt-get) is yum.

For more systematic ways of determining which distribution a Linux machine is running, see How to write a script that effectively determines distro name?. If you're lucky, lsb-release -si will give you the answer. Otherwise, look for indicative files such as /etc/*release* or /etc/*version*.

share|improve this answer
add comment

Do you have all dependencies installed, in particular GCC?

unrecognized command line option "-Wvla" sounds like you don't have GCC, or not a recent enough version.

What system are you running exactly (distribution, version, ...)?

PS: Why do you want to install dpkg on a non-debian / barebones Linux system, and not install Debian?

share|improve this answer
    
I have gcc 4.1.2. I gave the uname -a output. How do I get more information on the OS distribution? What package manager should I install on this machine? –  highBandWidth Oct 11 '12 at 23:21
add comment

As it seems that use a Red Hat based system, the default package manager should be rpm and probably yum the corresponding user-frontend.

Please note, that any package you install need to fit to your system and to the other installed packages.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.