Cannot do make install

A package compiled successfully in OBS but now cannot do make install:

make install
install -d -m 777 /usr/local
install: cannot change permissions of `/usr/local’: Operation not permitted

What to do to mitigate this now?

Hi,

Seems your package is not configured well and installs to the root dir of the machine, which is not authorized, instead files should be installed to the temporary dir %{buildroot}%{_prefix}

if you’re using autotools you can try something like :
make DESTDIR=%{buildroot} install
make prefix=%{buildroot}%{_prefix} install

or with cmake try to configure with -DCMAKE_INSTALL_PREFIX=%{buildroot}%{_prefix}

else modify your Makefile to support this kind install process

xan

if you’re using autotools you can try something like :
make DESTDIR=%{buildroot} install
make prefix=%{buildroot}%{_prefix} install

Neither works :frowning: Still tries to install into /usr/local

You need to run Make Install as root.

When building an RPM? Certainly not!

Well I solved this problem by passing the prefix to configure. But now I have another similar problem:

install -d -m 644 /opt/kde3/share/locale/de/LC_MESSAGES
install: cannot change permissions of `/opt/kde3/share/locale/de/LC_MESSAGES’: Operation not permitted
make: *** [install] Error 1

Hi
You need to run your configure command with either;


--prefix=%{_prefix}

--prefix=/usr

As note you never need to build and rpm as root…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 2 days 23:07, 4 users, load average: 0.26, 0.18, 0.06
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53

Hi
Use the macro %{makeinstall} or use;


make DESTDIR=%{buildroot} install


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 2 days 23:16, 3 users, load average: 0.24, 0.18, 0.10
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53

You need to run your configure command with either;

Yes! This is exactly what helped with the /usr/local issue :slight_smile:

Use the macro %{makeinstall} or use;

make DESTDIR=%{buildroot} install

This does not help.

I think the problem is in the following lines in makefile:

install -d -m 644 $(KDE_LOCALE)/de/LC_MESSAGES
install -d -m 644 $(KDE_LOCALE)/ca/LC_MESSAGES
install -d -m 644 $(KDE_LOCALE)/es/LC_MESSAGES
install -d -m 644 $(KDE_LOCALE)/pt_BR/LC_MESSAGES

It seems it tries to install something in KDE directory

Hi
Just define the KDE_LOCALE


make DESTDIR=%{buildroot} KDE_LOCALE=%{_datadir} install


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 3 days 2:16, 3 users, load average: 0.12, 0.16, 0.24
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53

Yes, but it also tries to make links and delete files in /bin and /usr/bin… :frowning:

Hi
What are you trying to build?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 3 days 3:26, 3 users, load average: 0.13, 0.14, 0.24
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53

Yup, misunderstood the OP.

Sorry about that.

Is it KDE3 package?
If so read Packaging/SUSE Package Conventions/Specific Packages - openSUSE

KDE_LOCALE=%{_datadir}

This does not work, it then tries to install the localization into /usr/share instead of /opt/kde3/share

What are you trying to build?

https://build.opensuse.org/package/show?package=hbasic&project=home%3AAnsus

I tried as they say but at the stage of update_admin there are errors and later also.

What to do with the following?

RPMLINT: E: BADNESS is 240678 - threshold exceeded. aborting the build.

RPMLINT: E: BADNESS is **2406788** - threshold exceeded. aborting the build.

Well, if this number is really correct, then contact Guinness, you have just set up a new world record.

(scnr)