LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   moving .so files between machines (https://www.linuxquestions.org/questions/linux-server-73/moving-so-files-between-machines-4175639366/)

Murk 09-28-2018 11:04 AM

moving .so files between machines
 
Hello,
I Have a custom built server running linux version 3.10.105 i do not have access to apt/yum or any other package installer.

I've recently installed fileinfo (wget hhtp://pecl.php.net/get/Fileinfo-1.0.4.tgz) but my machine must not have php5-dev installed as i cannot phpize the file (I did not set up this server)

Since i cannot install php5-dev i am wondering if i can phpize and ./configure the file on a machine with a proper OS and than transferring the fileinfo.so file over to the server or does ./configure do something system specific with the file?
Thanks in advance.

jsbjsb001 09-28-2018 11:30 AM

Quote:

Originally Posted by Murk (Post 5908897)
Hello,
I Have a custom built server running linux version 3.10.105 i do not have access to apt/yum or any other package installer.

I've recently installed fileinfo (wget hhtp://pecl.php.net/get/Fileinfo-1.0.4.tgz) but my machine must not have php5-dev installed as i cannot phpize the file (I did not set up this server)

Since i cannot install php5-dev i am wondering if i can phpize and ./configure the file on a machine with a proper OS and than transferring the fileinfo.so file over to the server or does ./configure do something system specific with the file?
Thanks in advance.

Well first, given Linux is just the OS kernel and not a complete system, then "linux 3.10.105" is the kernel version your Linux distribution is using. Based on that version, it looks like CentOS/RHEL or similar your running.

The "./" means the current working directory and the "configure" script checks to see if your system has the necessary build environment to be able to build the software you're trying to compile.

Manually copying shared libraries from one machine to another is a bad idea. You should be using yum instead to install stuff.

What exactly do you mean when you say "i do not have access to apt/yum or any other package installer" ?

Murk 09-28-2018 11:44 AM

Thanks for the reply im sure you have already noticed but i am a Linux newbie...

when i run uname -a or cat /proc/version it only gives me the kernel no OS is specified.

when i try to run any apt-get or apt install etc i get "command not found" so i guess I should be asking how can i download php5-dev so i can phpize and make a fileinfo.so.

thank you.

Shadow_7 09-28-2018 12:30 PM

If you do not have access to the package management system, then you likely do not have the permissions to install any .so files. Except in $HOME with special $PATH type things to use local .so files. If you had permissions you could swap/add the .so files to default locations and run ldconfig to update the cache of known .so files via the /etc/ld.so.conf.d/ files. With quirks of being compiled with the same compiler version or other gotchas.

jsbjsb001 09-28-2018 03:41 PM

Quote:

Originally Posted by Murk (Post 5908903)
Thanks for the reply im sure you have already noticed but i am a Linux newbie...

when i run uname -a or cat /proc/version it only gives me the kernel no OS is specified.

Try this instead:

Code:

cat /etc/os-release
Quote:

when i try to run any apt-get or apt install etc i get "command not found" so i guess I should be asking how can i download php5-dev so i can phpize and make a fileinfo.so.

thank you.
Then either you're not using a distribution that uses apt or there is something very wrong with your system. You need to find out which distribution exactly you are using. You could also manually download the right packages and install them with the deb, rpm, etc command - depending on you're distribution.

Murk 09-28-2018 03:57 PM

Thanks shadow and jsbjsb001 for your replies.

it is not that i am lacking permissions i am simply lacking the linux resources (ldconfig: command not found, rpm: command not found)

running cat: /etc/os-release: No such file or directory same with */etc/*-release

seems like the only ones that do work are uname -a or cat /proc/version which returns: Linux version 3.10.105 (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) )

Therefore i do not even know which specific packages to manually install and dont want to go around installing everything and anything in hopes something works as it is a company server.

Is there another way to make an .so file without phpize? because all i could think of is just creating the so then moving it over to the server.


When i run phpinfo() it states fileinfo IS enabled when i search the server with shh i cannot find fileinfo.so anywhere i even made an if statement to only fire if fileinfo extension is enabled... it fires.

In Synologys web station there is no option to enable fileinfo which makes me think fileinfo is not installed but for some reason phpinfo() is saying it is enabled. I checked every php.ini file on the server and added extension = fileinfo.so to every php.ini / .extension file just to be safe but they all state

PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/fileinfo.so'

the server i am on needs to run update.php for mediawiki but it will not run without fileinfo...

Is there a secret configuration file Synology is hiding? because it seems no matter what i change through web station my php.ini files remain the same checking/unchecking extensions inside the web station does directly effect my phpinfo() printout and can see changes being made... which brings me back around to fileinfo saying it is enabled but where is it?!

I have all the php.ini files extension_dir going to the same location (which does not contain fileinfo.so)

I am running php5.6 FPM/FastCGI with Apache and a reverse nginx proxy any help is greatly appreciated as I've exhausted google and am not getting anywhere and have run out of ideas and of course Synology forums are currently locked.

jsbjsb001 09-28-2018 04:14 PM

You could try the following, but you need to be running the following as the "root" user for it to work.

Code:

cat /boot/grub2/grub.cfg
Scroll down to the line similar to this and post it, using CODE tags - see my signature below if you're not sure.

Code:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'CentOS Linux (4.15.9-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.15.9-1.el7.elrepo.x86_64-advanced-14ea7d36-8c7a-4269-a1f1-cb2ec439addb'

Just post what it says after the line I've highlighted in bold, and just the first line or two after it.

.so files are compiled programs, the same as executable files are compiled programs. So you can't "make it" as such, but you could write some code and tell gcc to just compile a shared library from that code.

Shadow_7 09-28-2018 05:27 PM

$ cat /etc/issue

It's the default MOTD for telnet, but most times there and unchanged.

$ lsb_release -a

Sometimes there, but probably needs installing for minimum installations.

Depending on the distro, pacman, dnf, yast, emerge, and others exist, not just apt or rpm options these days. And by permissions, I mean root. Which some tools are ONLY available to root (system admin) or privileged users (sudo).

michaelk 09-28-2018 06:49 PM

Quote:

I Have a custom built server running linux version 3.10.105 i do not have access to apt/yum or any other package installer.

Synologys web station
Is your custom built server a regular Synology NAS device? If so, it runs their own operating system called DiskStation Manager (DSM). I don't know how PHP is configured but you might need to contact Synology directly.

Quote:

Synology America Corp.

+1 425 296 3177 (Support)

Hours of operation: 4AM-9PM, Monday-Friday, PST


Murk 10-01-2018 07:45 AM

Thanks everyone for your replies yes it does run DSM which is a real pain to get anything done.. but i figured it out and got my wiki updated and running again. Turns out sqlite the database i am using wasn't included in the defaults of the new wiki update just had to add 'sqlite' to $dbTypes in installer.php and then run update.php and it works!! hopefully this saves someone the embarrassing amount of time it took me to figure this out.


All times are GMT -5. The time now is 12:53 PM.