Unit memcached.service not found on Ubunto 20.04 when installing memcached - memcached

I'm trying to follow these instructions on Vultr for Ubuntu 20.04 to install memcached, however when I get to the step sudo make install, the output is:
make all-recursive
make[1]: Entering directory '/root/memcached-1.6.17'
Making all in doc
make[2]: Entering directory '/root/memcached-1.6.17/doc'
make all-am
make[3]: Entering directory '/root/memcached-1.6.17/doc'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Entering directory '/root/memcached-1.6.17'
make[2]: Leaving directory '/root/memcached-1.6.17'
make[1]: Leaving directory '/root/memcached-1.6.17'
root#plesk:~/memcached-1.6.17# ./memcached --version
memcached 1.6.17
root#plesk:~/memcached-1.6.17# sudo make install
make install-recursive
make[1]: Entering directory '/root/memcached-1.6.17'
Making install in doc
make[2]: Entering directory '/root/memcached-1.6.17/doc'
make install-am
make[3]: Entering directory '/root/memcached-1.6.17/doc'
make[4]: Entering directory '/root/memcached-1.6.17/doc'
make[4]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/usr/local/memcached/share/man/man1'
/usr/bin/install -c -m 644 memcached.1 '/usr/local/memcached/share/man/man1'
make[4]: Leaving directory '/root/memcached-1.6.17/doc'
make[3]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Leaving directory '/root/memcached-1.6.17/doc'
make[2]: Entering directory '/root/memcached-1.6.17'
make[3]: Entering directory '/root/memcached-1.6.17'
/usr/bin/mkdir -p '/usr/local/memcached/bin'
/usr/bin/install -c memcached '/usr/local/memcached/bin'
/usr/bin/mkdir -p '/usr/local/memcached/include/memcached'
/usr/bin/install -c -m 644 protocol_binary.h xxhash.h '/usr/local/memcached/include/memcached'
make[3]: Leaving directory '/root/memcached-1.6.17'
make[2]: Leaving directory '/root/memcached-1.6.17'
make[1]: Leaving directory '/root/memcached-1.6.17'
And then attempting to start memcached with:
sudo systemctl start memcached
results in Failed to start memcached.service: Unit memcached.service not found.
What am I missing here?
(Also Vultr instructs "Test if Memcached is active and running on TCP port 11211" by running netstat -tulpn | grep :11211--when I first tried to do this, I had to install netstat, but running this command does nothing.)

Since you installed memcached from source, you will need to run the binary directly from the command line to start the service.
/usr/local/memcached/bin/memcached -d -m 64 -l 127.0.0.1 -p 11211

Related

Netbeans Msys2 make Cygwin1.dll issue

I'm using Netbeans 11 and MSYS2 MINGW64 G++.
Here's a screenshot of my toolchains:
When I try to run a simple Hello World c++ I get the following errors:
0 [main] cppapplication_2_cygwin_try (19728) D:\Program-Workspaces\netbean
s11\CppApplication_2_Cygwin_Try\dist\Debug\MinGW_2-Windows\cppapplication_2_cygw
in_try.exe: *** fatal error - cygheap base mismatch detected - 0x180343408/0x180
347408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
In other cases like when using the CLANG++ compiler, everything compiles well with the make.exe.
Could someone help on this please?
Thanks.
EDIT: Adding the NB11 messages:
cd 'D:\Program-Workspaces\netbeans11\CppApplication_2_Cygwin_Try'
D:\Programs\msys64\usr\bin\make.exe -f Makefile CONF=Debug
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try.exe
make[2]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
mkdir -p build/Debug/MinGW_2-Windows
rm -f "build/Debug/MinGW_2-Windows/main.o.d"
g++ -std=c++2a -c -g -MMD -MP -MF "build/Debug/MinGW_2-Windows/main.o.d" -o build/Debug/MinGW_2-Windows/main.o main.cpp
mkdir -p dist/Debug/MinGW_2-Windows
g++ -std=c++2a -o dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try build/Debug/MinGW_2-Windows/main.o
make[2]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
make[1]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
BUILD SUCCESSFUL (total time: 17s)
cd 'D:\Program-Workspaces\netbeans11\CppApplication_2_Cygwin_Try'
D:\Programs\msys64\usr\bin\make.exe -f Makefile CONF=Debug
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
"/D/Programs/msys64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try.exe
make[2]: Entering directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
make[2]: 'dist/Debug/MinGW_2-Windows/cppapplication_2_cygwin_try.exe' is up to date.
make[2]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
make[1]: Leaving directory '/d/Program-Workspaces/netbeans11/CppApplication_2_Cygwin_Try'
BUILD SUCCESSFUL (total time: 3s)
0 [main] cppapplication_2_cygwin_try (17884) D:\Program-Workspaces\netbean
s11\CppApplication_2_Cygwin_Try\dist\Debug\MinGW_2-Windows\cppapplication_2_cygw
in_try.exe: *** fatal error - cygheap base mismatch detected - 0x180343408/0x180
347408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
RUN FAILED (exit value 127, total time: 1s)

make command fails over ubuntu 16.04 for thrift server

I have downloaded apache thrift.
step one move to thrift folder --
and run below commands over terminal
1- ./bootstrap.sh
2- ./configure
3- ./configure --without-java
below command fails
4- make
all-recursive
make[1]: Entering directory '/var/www/html/thrift'
Making all in compiler/cpp
make[2]: Entering directory '/var/www/html/thrift/compiler/cpp'
Making all in src
make[3]: Entering directory '/var/www/html/thrift/compiler/cpp/src'
/bin/bash ../../../ylwrap thrift/thrifty.yy y.tab.c thrift/thrifty.cc y.tab.h `echo thrift/thrifty.cc | sed -e s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/` y.output thrift/thrifty.output -- yacc -d
../../../ylwrap: line 176: yacc: command not found
Makefile:659: recipe for target 'thrift/thrifty.cc' failed
make[3]: *** [thrift/thrifty.cc] Error 127
make[3]: Leaving directory '/var/www/html/thrift/compiler/cpp/src'
Makefile:1483: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/var/www/html/thrift/compiler/cpp'
Makefile:683: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/www/html/thrift'
Makefile:599: recipe for target 'all' failed
make: *** [all] Error 2

PostgreSQL Installation through source code. [all-src-recurse] Error 2

I am new to PostgreSQL. I am trying to install Postgres through source code. If I use some prebuilt binaries I am getting some dependency bugs. So I am using source code installation. While running the second step of Postgres installation i.e. make command I am getting these errors.
make[4]: *** [spgtextproc.o] Error 1
make[4]: Leaving directory `/usr/postgresql-9.5.10/src/backend/access/spgist'
make[3]: *** [spgist-recursive] Error 2
make[3]: Leaving directory `/usr/postgresql-9.5.10/src/backend/access'
make[2]: *** [access-recursive] Error 2
make[2]: Leaving directory `/usr/postgresql-9.5.10/src/backend'
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory `/usr/postgresql-9.5.10/src'
make: *** [all-src-recurse] Error 2
Using sudo make install fixed the error for me
try these steps
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
While running the below command, I thought that src refers to the src directory(src) inside Postgres. And ran prefix to link it
./configure --prefix ~/postgres-12.0/src/
Here source refers to the directory where Postgres needs to be installed not the Postgres src directory.
Running the command like below solved it.
mkdir ~/any_directory
./configure --prefix ~/any_directory/

Netbeans fortran build fails on Mac OS 10.8, cannot see gfortran file

I'm trying to get Netbeans up and running so I can start a Fortran project. I've downloaded the binaries and installed the plugins to the best of my knowledge. When I try to compile my hello world I get this error:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/convection
mkdir -p build/Debug/GNU-MacOSX
gfortran -c -g -o build/Debug/GNU-MacOSX/main.o main.f
gfortran: error trying to exec 'f951': execvp: No such file or directory
make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 111ms)
Any thoughts?
EDIT: I'm using Mac OSX 10.8.5
EDIT 2: I've been messing around for awhile now and now the error is slightly different:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/convection
mkdir -p build/Debug/GNU-MacOSX
gfortran -c -g -o build/Debug/GNU-MacOSX/main.o main.f
make[2]: gfortran: No such file or directory
make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 127ms)
EDIT 3: And just for fun, here is the output from a successful build that I was able to do in Ubuntu:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/hannah/NetBeansProjects/test'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/test
make[2]: Entering directory `/home/hannah/NetBeansProjects/test'
make[2]: `dist/Debug/GNU-Linux-x86/test' is up to date.
make[2]: Leaving directory `/home/hannah/NetBeansProjects/test'
make[1]: Leaving directory `/home/hannah/NetBeansProjects/test'
BUILD SUCCESSFUL (total time: 92ms)
I had the same problem on 10.9. I needed to make a new gfortran link in my /usr/bin (Base directory). After that it worked fine. If I had it in usr/local/bin,..or any other path it didn't work.
Here is a link to someone else's solution to this problem. gfortran is unable to find f951.
http://ubuntuforums.org/showthread.php?t=1164394
I think I found the solution here: http://eftrunk.blogspot.com/2011/11/how-to-fix-error-trying-to-exec-f951.html
Will report back if it works or not.

Xively C library with ubuntu eclipse(gcc/g++) 32bit crosscompilation app connectivity

I have optimised my ubuntu 13.04 running 64-bit machine to cross-compile for 32bit ARM and checked by developing c/c++ code the code is successfully running on 32bit ARM(BBBlack) NOW what I want to achieve is connectivity with the Xively server's updating and retrieving feeds/datapoints from datastreams.
So I'm thinking to utilise the c library from Xively to use in my Ubuntu eclipse development environment will it work?
Will there be any crosscompilation problem's? or Is it all fine?
The following is what I'm getting when I run >> make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc examples
make: *** src: No such file or directory. Stop.
nishant#Nishant-K53SC:~$ cd libxively
nishant#Nishant-K53SC:~/libxively$ make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc libxively
make: Entering directory `/home/nishant/libxively/src'
make -C libxively
make[1]: Entering directory `/home/nishant/libxively/src/libxively'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/nishant/libxively/src/libxively'
make: Leaving directory `/home/nishant/libxively/src'
nishant#Nishant-K53SC:~/libxively$ make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc libxively
make: Entering directory `/home/nishant/libxively/src'
make -C libxively
make[1]: Entering directory `/home/nishant/libxively/src/libxively'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/nishant/libxively/src/libxively'
make: Leaving directory `/home/nishant/libxively/src'
nishant#Nishant-K53SC:~/libxively$ make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc examples
make: Entering directory `/home/nishant/libxively/src'
make -C examples
make[1]: Entering directory `/home/nishant/libxively/src/examples'
for dir in datapoint_delete datapoint_delete_range datastream_create datastream_delete datastream_get datastream_update feed_get feed_update; do (make -C $dir) || exit 1; done
make[2]: Entering directory `/home/nishant/libxively/src/examples/datapoint_delete'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datapoint_delete'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datapoint_delete_range'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datapoint_delete_range'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_create'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_create'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_delete'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_delete'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_get'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_get'
make[2]: Entering directory `/home/nishant/libxively/src/examples/datastream_update'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/datastream_update'
make[2]: Entering directory `/home/nishant/libxively/src/examples/feed_get'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/feed_get'
make[2]: Entering directory `/home/nishant/libxively/src/examples/feed_update'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/nishant/libxively/src/examples/feed_update'
make[1]: Leaving directory `/home/nishant/libxively/src/examples'
make: Leaving directory `/home/nishant/libxively/src'
UPDATES ERRORS WHILE BUILDING WITH LIBRARy:
Build of configuration Debug for project Test **
make all
Building file: ../src/Test.cpp
Invoking: GCC C++ Compiler
arm-linux-gnueabi-g++ -I/usr/arm-linux-gnueabi/include/c++/4.7.3 -I/home/nishant/libxively/src/libxively -I/usr/arm-linux-gnueabi/include/c++/4.7.3/bits -I/usr/arm-linux-gnueabi/include/c++/4.7.3/ext -I/usr/arm-linux-gnueabi/include/c++/4.7.3/arm-linux-gnueabi -I/usr/arm-linux-gnueabi/include/c++/4.7.3/backward -I/usr/arm-linux-gnueabi/include/c++/4.7.3/decimal -includexively.h -includexi_helpers.h -includexi_err.h -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Test.d" -MT"src/Test.d" -o "src/Test.o" "../src/Test.cpp"
/home/nishant/workspace/Test/src/libxively.a: could not read symbols: File format not recognized
Finished building: ../src/Test.cpp
collect2: error: ld returned 1 exit status
Building target: Test
make: *** [Test] Error 1
Invoking: GCC C++ Linker
arm-linux-gnueabi-g++ -L/home/nishant/workspace/Test/src -L/usr/arm-linux-gnueabi/lib -o "Test" ./src/Test.o -lxively
**** Build Finished ****
Xively C library should work on any 32-bit and 64-bit POSIX OS as well as various RTOS with lwIP.
To cross compile the library using arm-linux-eabi-gcc, you need to run the following command in the toplevel directory:
make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc libxively
make -C src CC=arm-linux-eabi-gcc AR=arm-linux-eabi-gcc examples
Detailed instructions
Below I will describe how to compile a simple example C program and statically link it with Xively library. This should provide enough background information. Although, I cannot provide information on how to fix Eclipse IDE as I doubt it's possible.
Create a directory and clone the library:
mkdir hello_xively
cd hello_xively
git clone --recursive https://github.com/xively/libxively
Add the test.c file now as shown:
#include "xively.h"
int main() {
xi_context_t* ctx = xi_create_context( XI_HTTP, "DUMMY_API_KEY_STRING", 123 );
xi_delete_context( ctx );
return 0;
};
Build the library itself (please note that CC and AR values for your target may differ):
export CC=arm-linux-eabi-gcc # C compiler fron-end for the ARM Linux target
export AR=arm-linux-eabi-ar # This is needed for the build to work
export XI=`pwd`/libxively.a # To store the output in current direcory
make -C libxively/src libxively
Compile test.c and link it with the static library:
$CC test.c \
-I./libxively/src/libxively \
libxively.a -o xively_static_test
You now can try copying the xively_static_test executable to the target device's filesystem and execute it, which should produce no output as it's a test example. No you can extend the above example to provide functionality you desire!