Some problems with Redis and Python installed on LinuxMint

Source: Internet
Author: User

There are some problems with Redis and Python installed today, which are documented after the resolution.

Environment: LinuxMint 18.3

Installing Redis
sudo wget http://download.redis.io/releases/redis-4.0.8.tar.gzsudo tar -zxf redis-4.0.8.tar.gz -C /usr/redis/cd /usr/redis/redis-4.0.8sudo make

My installation directory is/usr/redis.

The following issues were encountered during make:

net.c:36:23: fatal error: sys/types.h: No such file or directory...adlist.c:32:20: fatal error: stdlib.h: No such file or directory

The reason is that the file is missing and make resolved again after executing the following command:

sudo apt-get install libc6-dev

Reference: http://blog.csdn.net/yygydjkthh/article/details/41787049

zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory

The reason is that libc is not the default allocator, adding parameters after make is resolved:

sudo make MALLOC=libc

Reference: http://blog.csdn.net/fygkchina/article/details/51006976

Python version switching

The two versions of Python are built into Mint 18.3:2.7 and 3.5, when using the Python command by default, 2.7, for personal needs 3, to find a better way to not delete Python2:

Note: Only available for Linux in the Debian system

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 9sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 10

/usr/bin/python2.7 and/usr/bin/python3.5 are the local Python installation directories, and the following 9 and 10 are priorities, and if 3 is preferred, the priority is set to a value higher than 2.

View the Python version again

python --versionPython 3.5.2

Note: Only available for Linux in the Debian system

If you want to switch back to 2 It's also easy to execute the command

sudo update-alternatives --config python

Then select the appropriate option to toggle the success

$ sudo update-alternatives --config python有 2 个候选项可用于替换 python (提供 /usr/bin/python)。  选择       路径              优先级  状态------------------------------------------------------------* 0            /usr/bin/python3.5   10        自动模式  1            /usr/bin/python2.7   9         手动模式  2            /usr/bin/python3.5   10        手动模式要维持当前值[*]请按<回车键>,或者键入选择的编号:1update-alternatives: 使用 /usr/bin/python2.7 来在手动模式中提供 /usr/bin/python (python)$ python --versionPython 2.7.12

More Solutions: http://blog.csdn.net/justdoithai/article/details/70310095

Some problems with Redis and Python installed on LinuxMint

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.