Remote IDE on Red Hat Enterprise Linux Server release 5.5 - linux

I have this version of Linux server:
-bash-3.2$ cat /proc/version
Linux version 2.6.18-194.11.1.el5 (mockbuild#hs20-bc2-3.build.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Jul 27 05:45:06 EDT 2010
-bash-3.2$ cat /etc/*release*
cat: /etc/lsb-release.d: Is a directory
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Currently, I am writing c program on the Linux side, I will need the server power to execute my program. I prefer IDE, but since my machine is Windows and what not, I have to compile the program remotely on the server. Sometimes, it's such a pain that I cannot run a stacktrace after the program crashes. And the thing is I want is to achieve higher productivity.
I can only access this server with PuTTY or the like, and I do not have the rights to install any software. And updating the software in the server is also not possible.
I see that the server got programs like Matlab that can output to XMing on the client side. (Ex. I can run Matlab as a GUI from the server side and have it display on my client device)
I see that some people suggest me for Eclipse, but the IDE is way too slow. In fact, it lowers productivity.
So is there any recommendation or a scheme that will allow me to compile, execute and debug my program remotely on the server with better ease-of-use, given the bold criteria above?

You cannot install as root, but maybe you can manually install applications in your user directory? With that and X11 forwarding you should be set (except a bit of latency).
Also, if you have gdb on the remote (which you probably do since you also have the compiler) you can see stack traces with it after enabling core dumps (ulimit -c unlimited), by opening the binary and the core file: gdb -c , then bt.

Related

Installing Octave on raspberry pi

I'm using Linux Debian on Raspberry PI and have installed Octave. Here is Octave startup :
pi#pi1 ~ $ octave
octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
GNU Octave, version 4.0.0
Copyright (C) 2015 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "arm-unknown-linux-gnueabihf".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html
Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.
When attempt to run Octave GUI such as :
plot(3,3) the output is displayed on command line :
Message "octave: disabling GUI features" (as part of startup output above) indicates cannot use GUI features.
What version of Linux should I install on PI and version of Octave in order to GUI plot such as :
As I can guess from your first screenshot, you are using putty from a windows machine to ssh into your raspberry pi. You have to enable X11 forwarding in Putty (Connections->SSH->X11) and install a X11 server on the windows side like Xming (http://sourceforge.net/projects/xming/). Or the easiest way: Plug a monitor to your RaspberryPI and use GNU/Linux and Octave directly.
Connect a screen and execute command
startx
to start X server, then open a terminal and try installing from the terminal. If you don't have a screen then do X11 forwarding as mentioned by #Andy.

How to compile a linux app to run on a shared web server

I am trying to get a small C application to run on my web server. The web hosting company is HostGator and we have their least-expensive plan 'Hatchling'
Unfortunately this particular plan does not provide access to a compiler, which means I'll need to build it on a similar machine to that server and transfer the executable there.
My question is how 'close' do I have to get to the Linux distribution on that web server for this to work? I currently have a recent Ubuntu in a VM and would like to use it for this process but maybe some complex differences in how Ubuntu compiler chain is built versus what can work on the web server are too great?
Would I need to install the CentOS release 6.5 they use and compile on that?
What do you recommend I do to attack this problem?
John,
P.S. Hostgator runs 'CentOS release 6.5 (Final)' and /proc/version returns "Linux version 3.2.52 (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) )"
It is worth checking that the architecture is the same e.g. Intel - 32bit or 64bit. In theory 32bit will work on a 64bit architecture as long as supporting libraries have been installed.
Dependancies are the other challenge you will have.
Versions of GCC and Kernel versions do not matter too much.

Problems restarting Apache Server

Well, I'm having some problems restarting my Apache Server. I modified the ulimit on the server but I'm failing to restart httpd;
I'm running the server on CentOS 5.8 x64. The output from httpd -V:
Server version: Apache/2.2.3
Server built: Jan 10 2013 08:19:28
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 64-bit
The error I'm getting when running /sbin/service httpd restart(I'm not going to print the hall output):
Syntax error on line 210 of /etc/httpd/conf/httpd.conf:
Syntax error on line 6 of /etc/httpd/conf.d/php.conf:
Cannot load /etc/httpd/modules/libphp5.so into server: libidn.so.11:
wrong ELF class: ELFCLASS32
I googled this error and tried to dig for the problem. What I found is that libphp5.so is 64-bit architecture whilst libidn.so.11 is 32-bit. Normally, as I know, there shouldn't be a problem using 32-bit programs on 64-bit architecture, but in this case there's 32-bit library used in 64-bit program(****See this related question**).
I tried to install the 64-bit version of the library but what I could find, for my O.S.(centOS 5.8) is the libidn_x86_64 version, which is again on 32-bit.
Programs installed on server:
squid - Proxy
ffmpeg - for video streaming
csf-lfd -> firewall
Apache
Any help on finding the problem is appreciated!
Since the version of libidn in CentOS 5.1 is the same as in 5.9 (indeed it's the same file), it's probably a safe bet that it will install in 5.8
could find, for my O.S.(centOS 5.8) is the libidn_x86_64 version, which is again on 32-bit.
No, the name implies it's the 64 bit version - if it contains a 32 bit object file, then something has gone way wrong - further, given the wide usage of CentOS and that libidn is required for all sorts of things, I'm sure someone would have noticed by now if the rpm contained the wrong file.
You might want to spend some time thinking about how your server got into this state. It shouldn't have been possible to install/upgrade the PHP from Centos respoitories with the right dependencies in place (unless you forced it to ignore them).

Brother QL-720NW, printing labels using CUPS & Ubuntu

I'm trying to get my Brother QL-720NW label printer working from an Ubuntu server. I'll briefly describe the process so far, and where I'm stuck.
First I installed CUPS and LPR and cupswrapper drivers from Brothers website, and now my QL-720NW shows up in the CUPS web interface. I set the default media size to fit my label(29x90mm). I clicked "Test print page" on the QL-720NW and it says "Sending data to printer." a few seconds, and then disappears and changing state to Idle, Accepting Jobs, Not Shared, Server Default. But my printer does nothing, not even a led light blinking.
My cups/error_log looks like this. I have googled the AddProfile failed error, and found someone suggesting it is a bug in Ubuntu 12.10, but I've also read that Arch users have had the same error, so I'm not sure. And the Uknown directive SystemGroup error is just a harmless error according to this site.
E [23/Apr/2013:12:20:47 +0200] Unknown directive SystemGroup on line 18 of /etc/cups/cupsd.conf.
W [23/Apr/2013:12:20:47 +0200] AddProfile failed: org.freedesktop.DBus.Error.UnknownMethod:No such interface `org.freedesktop.ColorManager' on object at path /org/freedesktop/ColorManager/devices/cups_QL_720NW
When I run lpstat -tl after trying to print a test page or a text file using lp test.txt, it says it's sending data to the printer. But the printer does nothing.
# lpstat -tl
scheduler is running
system default destination: QL-720NW
device for QL-720NW: usb://Brother/QL-720NW?serial=000K2Z658058
QL-720NW accepting requests since Tue 23 Apr 2013 12:45:56 PM CEST
printer QL-720NW is idle. enabled since Tue 23 Apr 2013 12:45:56 PM CEST
Sending data to printer.
So, does anyone have any suggestions where to go from here? Is there any other log files that might give me a clue of whats wrong?
I was able to get 64-bit Ubuntu working with the official QL-720NW drivers using their work-around:
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/faq_prn.html#f00081
apt-get install cups cups-bsd
apt-get install ia32-libs
dpkg -i --force-architecture ql720nwlpr-1.0.1-1.i386.deb
dpkg -i --force-architecture ql720nwcupswrapper-1.0.1-1.i386.deb
cp /usr/lib/cups/filter/brlpdwrapper* /usr/lib64/cups/filter
cp /usr/lib/cups/filter/brlpdwrapper* /usr/lib64/cups/filter
My Linux distro (uname -a):
Linux 3.2.0-40-virtual #64-Ubuntu SMP Mon Mar 25 21:42:18 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux
I finally got it to print on my Ubuntu system. The problem seemed to be that the drivers from Brother is not 64bit compatible, and I was using a 64bit version of Ubuntu.
I tried on Debian first, after learning from #sampi that he got it to work on Debian. When installing the drivers I got an error message, which I didn't get on Ubuntu, suggesting a 32/64bit issue. So after installing the ia32-libs packages it worked on Debian. I then tried installing a 32bit version of Ubuntu on my server, and now the printer did work.
But I can only get the printer to work through wifi(both on Debian and Ubuntu). No success with the USB cable, but that's not an issue for me.
I have used a QL-720NW with Debian since September. Using first the QL-580N driver & later, once it got released, the QL-720NW driver. Prior to buying the printer I did contact brother support who, within a very helpful response, told me that the printer worked as a network printer with the older product's driver, but not over USB.
Given that you do not explicitly state that you need to print via USB, I suggest you try connecting the printer to your network & reconfigure cups to use that connection instead.
FWIW: On Debian testing, I just installed the drivers from the Brother site (version 1.0.1 for both) and the QL-720nw printed via USB with no issues. I didn't even have to force anything (I already had multiarch installed to support other stupid 32-bit-only software), nor use any workaround. I haven't yet tried to use it on a network.

Why do I get "Error 6060" when I try to use DBD::Advantage with a 64-bit perl on Linux?

I realize that I am attempting to go beyond the "supported" behavior of the manf's released drivers for Perl, after all they have only released it in package with x86 .so's.
However, since I cannot use their package with x64 Perl on a RHEL 5.4 x86_64 box, and maintaining a seperate install of x86 Perl just for this one package, I have made an attempt to get this puppy working thanks to released 64-bit .so's that accompany other driver packages for Advantage.
What I have done to this point:
download beta 10 DBI drivers, in 32
download beta 10 PHP extension (it contains 32 and x86_64)
copy the required DLLs into the ads-lib location (eg /usr/local/ads/lib64)
compile the Perl DBI driver with the path to the lib64's .so's
Good compilation, good install, good use.
The problem is that I always get :
failed: [iAnywhere Solutions][Advantage SQL][ASA] Error 6060: Advantage Database Server not available on specified server. axServerConnect (SQL-HY000)(DBD: db_login/SQLConnect err=-1)
Does anyone have any ideas?
EDIT: fixed package name in post title
EDIT: Updated title.
It appears that it's not just the x64 perl, but the RHEL 5.4 underneath that may be interfering. As commented below, I managed to shoe-horn a x86 perl onto the system, and compile the DBD::Advantage 9.99, and later replacing that with 9.10, and none of these x86 would connect either. Neither library (9.99 or 9.10) in either bit-edness will connect from this x86_64 server to the windows server's UNC path.
I have successfully mounted this share without problems, but still I cannot seem to connect to the 9.1. I have tried:
\hostname\PATH
\FQDN\PATH
\IP\PATH
and all of these variations with the port (default) 6262 included.
My windows machine connects fine, with both 9.1 and 9.99 from strawberry perl.
Check the host file on the Linux server and make sure the name of the server uses the actual IP rather then the loopback address.
Also, since you updated the client, did you also install/update the 10 beta server?
Finally, what is your connection string? Have you tried adding the port to the connection string?

Resources