Kroko Just another WordPress weblog

October 9, 2017

Erori compilare mc pe macos 10.13 macports

Filed under: MacOS — admin @ 11:05 am

Urmati tutorialul de mai jos daca primiti acelasi mesaj ca si mine:

kroko:sources kroko$ sudo port install mc

—>  Computing dependencies for mc

—>  Fetching archive for mc

—>  Attempting to fetch mc-4.8.19_0+slang2.darwin_17.x86_64.tbz2 from https://packages.macports.org/mc

—>  Attempting to fetch mc-4.8.19_0+slang2.darwin_17.x86_64.tbz2 from http://nue.de.packages.macports.org/mc

—>  Attempting to fetch mc-4.8.19_0+slang2.darwin_17.x86_64.tbz2 from http://lil.fr.packages.macports.org/mc

—>  Fetching distfiles for mc

—>  Verifying checksums for mc

—>  Extracting mc

—>  Applying patches to mc

—>  Configuring mc

—>  Building mc

Error: Failed to build mc: command execution failed

Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_mc/mc/main.log for details.

Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Error: Processing of port mc failed

 

FIX:

cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_mc/mc/work/mc-4.8.19

editam fisierul: src/filemanager/file.c

cautam linia ”

get_times (const struct stat *sb, mc_timesbuf_t * times)"

si acolo vom gasi ceva de genul:

get_times (const struct stat *sb, mc_timesbuf_t * times)

{

#ifdef HAVE_UTIMENSAT

    (*times)[0] = sb->st_atim;

    (*times)[1] = sb->st_mtim;

#else

     times->actime = sb->st_atime;

     times->modtime = sb->st_mtime;

 

modificam liniile:

    (*times)[0] = sb->st_atim;

    (*times)[1] = sb->st_mtim;

cu:

    (*times)[0] = sb->st_atimespec;

    (*times)[1] = sb->st_mtimespec;

 

in final trebuie sa ramanem cu:

get_times (const struct stat *sb, mc_timesbuf_t * times)

{

#ifdef HAVE_UTIMENSAT

    (*times)[0] = sb->st_atimespec;

    (*times)[1] = sb->st_mtimespec;

#else

     times->actime = sb->st_atime;

     times->modtime = sb->st_mtime;

dupa ce terminam de editat lansam din nou comanda:

kroko:mc-4.8.19 kroko$ sudo port install mc

--->  Computing dependencies for mc

--->  Building mc

--->  Staging mc into destroot

--->  Installing mc @4.8.19_0+slang2

--->  Activating mc @4.8.19_0+slang2

--->  Cleaning mc

--->  Updating database of binaries

--->  Scanning binaries for linking errors

--->  No broken files found.

Great succes 🙂

August 10, 2016

How to push routes to dhcp clients using ISC dhcp server

Filed under: Linux — admin @ 3:34 pm

In dhcpd.conf:

# defines the type of data used to send the routing informations
option classless-routes code 121 = array of unsigned integer 8;

# defines 2 gateways for 2 subnets:
# 192.168.100.0/24, gateway 192.168.1.2
# and 10.4.0.0/24, gateway 192.168.1.2
option classless-routes 24, 192,168,100, 192,168,1,2,
                        24, 10,4,0, 192,168,1,2;

dhclient on Debian/Ubuntu is able to handle the data out of the box.

To make the configuration work on Windows clients, duplicate the configuration with code 249:

option classless-routes code 121 = array of unsigned integer 8;
option classless-routes 24, 192,168,100, 192,168,1,2,
                        24, 10,4,0, 192,168,1,2;
option classless-routes-win code 249 = array of unsigned integer 8;
option classless-routes-win 24, 192,168,100, 192,168,1,2,
                            24, 10,4,0, 192,168,1,2;

November 6, 2015

How to remove executable bit recursively from files (not directories)

Filed under: Linux — admin @ 11:09 am

When I plug-in an USB stick (FAT) into my Centos Linux machine, all files have the executable bits set. After having copied the directory structure to my hard disk I remove the executable bits recursively just from the files and keep those on the directories with following command:

chmod -R -x+X *

Explanation:

  • -R – operate recursively
  • -x – remove executable flags for all users
  • +X – set executable flags for all users if it is a directory
Older Posts »

Powered by WordPress