After some server update I am no able to execute an C program (it was working yesterday and something was changed in my server causing this problem).
I’ve at this folder /home/int/exe/ a c program named aesdecript with 777 permission. So if type the following commands as root:
$ cd /home/int/exe/
$ ./aesdecrypt
-bash: /home/int/exe/aesdecrypt: No such file or directory
$ sh aesdecrypt
aesdecrypt: 1: Syntax error: "(" unexpected
$ ldconfig aesdecrypt
ldconfig: relative path `aesdecrypt' used to build cache
$ system("/home/int/exe/aesdecrypt")
-bash: syntax error near unexpected token `"/home/int/exe/aesdecrypt"'
aesdecrypt is a C program.
Someone have any idea? This program was working a couple days ago.
Below aesdecrypt source code:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include "aes.h"
int aes_crypt_decrypt(int encrypt, char *finput, char *foutput);
#define TRUE 1
#define FALSE 0
int main(int argc, char **argv) {
puts("Oi mundo!"); /* prints Magick Teste! */
/*if( argc < 3 )
return (1);
aes_crypt_decrypt( TRUE, argv[1], argv[2] );*/
return EXIT_SUCCESS;
}
Regards, Tiago
The symptoms you are describing are very similar to those you get when trying to execute a 32-bit binary on a 64-bit system and 32-bit “emulation” is not available. In that case, even if the binary is executable and everything is right, the system error code is “No such file or directory”. In order to fix the problem, install support for 32-bit executables using the following command:
This is probably what went missing after an upgrade. For a longer story, see this article.