Under Ubuntu Server 14, there was an error compiling Redis: CC Adlist.o/bin/sh:1:cc:not found

Source: Internet
Author: User
Tags redis

Under Ubuntu Server 14, install the Redis issue:

Issue one: CC Adlist.o/bin/sh:1:cc:not found

Cause of the problem: this is because the system does not have a GCC environment installed, so the above prompt will appear at compile time, and the above error will disappear when GCC is installed and then compiled.

Specific solutions:

1) First install gcc: switch to root user, run sudo apt-get install gcc

2) Reset && make install


Question two: Redis jemallo/jemallo.h:no such file or directory

In the case of a problem, perform the make compile command, there is a problem: Redis jemallo/jemallo.h:no such file or directory

Cause Analysis: There is a paragraph in the readme.

Allocator
---------

Selecting a Non-default memory allocator when building Redis are done by setting
The ' MALLOC ' environment variable. Redis is compiled and linked against LIBC
malloc by default, with the exception of Jemalloc being the default on Linux
Systems. This default is picked because Jemalloc has proven to having fewer
Fragmentation problems than libc malloc.

To force compiling against libc malloc, use:

% make MALLOC=LIBC

To compile against Jemalloc in Mac OS X systems, use:

% make Malloc=jemalloc


Said about the allocator allocator, if there is malloc this environment variable, it will be useful for this environment variable to establish redis.

And libc is not the default allocator, the default is Jemalloc, because Jemalloc is proven to have fewer fragmentation problems than libc.

But if you don't have a jemalloc and only libc of course make a mistake. So add such a parameter.

Workaround: Make MALLOC=LIBC

Finally, run the make test



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.