在linux上安装wxPython4.0.4时需要gtk+2.0,在安装wxPython4.0.4遇到以下错误。

linux上是用pip安装wxPython4.0.4的,执行命令如下:

pip install wxpython

[root@gm gtk+]# pip install wxpython
Collecting wxpython
Downloading http://mirrors.zte.com.cn/pypi/packages/17/74/7c3ced03c3c76b9f98e4a0edae1801755a7599ebf481c04d9f77dfff17e3/wxPython-4.0.4.tar.gz (68.8MB)
% |████████████████████████████████| .8MB .7MB/s
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2./site-packages (from wxpython)
Requirement already satisfied (use --upgrade to upgrade): Pillow in /usr/lib64/python2./site-packages (from wxpython)
Installing collected packages: wxpython
Running setup.py install for wxpython ... error
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t_6afe/wxpython/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pnjkOu-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future. "/usr/bin/python2" -u build.py build
Will build using: "/usr/bin/python2"
2.7. (default, Oct , ::)
[GCC 4.8. (Red Hat 4.8.-)]
Python's architecture is 64bit
cfg.VERSION: 4.0. Running command: build
Running command: build_wx
wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
Configure options: ['--enable-unicode', '--with-gtk=3', '--with-opengl', '--enable-sound', '--enable-graphics_ctx', '--enable-mediactrl', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
/tmp/pip-build-t_6afe/wxpython/ext/wxWidgets/configure --enable-unicode --with-gtk= --with-opengl --enable-sound --enable-graphics_ctx --enable-mediactrl --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for --disable-gui... no
checking for --enable-monolithic... no
checking for --enable-plugins... no
checking for --without-subdirs... no
checking for --enable-official_build... no
checking for --disable-all-features... no
checking for --enable-universal... no
checking for --enable-nanox... no
checking for --enable-gpe... no
checking for toolkit... gtk
checking for --with-libpng... yes
checking for --with-libjpeg... yes
checking for --with-libtiff... yes
checking for --without-libjbig... no
checking for --without-liblzma... no
checking for --with-libxpm... yes
checking for --with-libiconv... yes
checking for --with-libmspack... no
checking for --without-gtkprint... no
checking for --with-gnomevfs... no
checking for --with-libnotify... yes
checking for --with-hildon... no
checking for --with-opengl... yes
checking for --with-dmalloc... no
checking for --with-sdl... yes
checking for --with-regex... yes
checking for --with-zlib... yes
checking for --with-expat... yes
checking for --with-macosx-sdk...
checking for --with-macosx-version-min...
checking for --enable-debug... default
checking for --disable-debug_flag... no
checking for --enable-debug_info... no
checking for --enable-debug_gdb... no
checking for --enable-debug_cntxt... no
checking for --enable-mem_tracing... no
checking for --disable-shared... no
checking for --enable-stl... no
checking for --enable-std_containers... no
checking for --enable-std_iostreams... yes
checking for --enable-std_string... yes
checking for --enable-std_string_conv_in_wxstring... no
checking for --disable-unicode... no
checking for --enable-mslu... no
checking for --enable-utf8... no
checking for --enable-utf8only... no
checking for --enable-extended_rtti... no
checking for --disable-optimise... no
checking for --enable-profile... no
checking for --enable-no_rtti... no
checking for --enable-no_exceptions... no
checking for --enable-permissive... no
checking for --enable-no_deps... no
checking for --disable-vararg_macros... no
checking for --enable-universal_binary... no
checking for --enable-macosx_arch... no
checking for --enable-compat26... no
checking for --disable-compat28... no
checking for --disable-rpath... no
checking for --enable-objc_uniquifying... no
checking for --disable-visibility... no
checking for --disable-tls... no
checking for --enable-intl... yes
checking for --enable-xlocale... yes
checking for --enable-config... yes
checking for --enable-protocols... yes
checking for --enable-ftp... yes
checking for --enable-http... yes
checking for --enable-fileproto... yes
checking for --enable-sockets... yes
checking for --enable-ipv6... no
checking for --enable-ole... yes
checking for --enable-dataobj... yes
checking for --enable-ipc... yes
checking for --enable-baseevtloop... yes
checking for --enable-epollloop... yes
checking for --enable-selectloop... yes
checking for --enable-any... yes
checking for --enable-apple_ieee... yes
checking for --enable-arcstream... yes
checking for --enable-base64... yes
checking for --enable-backtrace... yes
checking for --enable-catch_segvs... yes
checking for --enable-cmdline... yes
checking for --enable-datetime... yes
checking for --enable-debugreport... no
checking for --enable-dialupman... yes
checking for --enable-dynlib... yes
checking for --enable-dynamicloader... yes
checking for --enable-exceptions... yes
checking for --enable-ffile... yes
checking for --enable-file... yes
checking for --enable-filehistory... yes
checking for --enable-filesystem... yes
checking for --enable-fontenum... yes
checking for --enable-fontmap... yes
checking for --enable-fs_archive... yes
checking for --enable-fs_inet... yes
checking for --enable-fs_zip... yes
checking for --enable-fsvolume... yes
checking for --enable-fswatcher... yes
checking for --enable-geometry... yes
checking for --enable-log... yes
checking for --enable-longlong... yes
checking for --enable-mimetype... yes
checking for --enable-printfposparam... yes
checking for --enable-snglinst... yes
checking for --enable-sound... yes
checking for --enable-stdpaths... yes
checking for --enable-stopwatch... yes
checking for --enable-streams... yes
checking for --enable-sysoptions... yes
checking for --enable-tarstream... yes
checking for --enable-textbuf... yes
checking for --enable-textfile... yes
checking for --enable-timer... yes
checking for --enable-variant... yes
checking for --enable-zipstream... yes
checking for --enable-url... yes
checking for --enable-protocol... yes
checking for --enable-protocol_http... yes
checking for --enable-protocol_ftp... yes
checking for --enable-protocol_file... yes
checking for --enable-threads... yes
checking for --enable-iniconf... no
checking for --enable-regkey... yes
checking for --enable-docview... yes
checking for --enable-help... yes
checking for --enable-mshtmlhelp... yes
checking for --enable-html... yes
checking for --enable-htmlhelp... yes
checking for --enable-xrc... yes
checking for --enable-aui... yes
checking for --enable-propgrid... yes
checking for --enable-ribbon... yes
checking for --enable-stc... yes
checking for --enable-constraints... yes
checking for --enable-loggui... yes
checking for --enable-logwin... yes
checking for --enable-logdialog... yes
checking for --enable-mdi... yes
checking for --enable-mdidoc... yes
checking for --enable-mediactrl... yes
checking for --enable-gstreamer8... no
checking for --enable-richtext... yes
checking for --enable-postscript... yes
checking for --enable-printarch... yes
checking for --enable-svg... yes
checking for --enable-webkit... yes
checking for --enable-webview... yes
checking for --enable-graphics_ctx... yes
checking for --enable-clipboard... yes
checking for --enable-dnd... yes
checking for --disable-controls... no
checking for --enable-markup... yes
checking for --enable-accel... yes
checking for --enable-animatectrl... yes
checking for --enable-bannerwindow... yes
checking for --enable-artstd... yes
checking for --enable-arttango... auto
checking for --enable-bmpbutton... yes
checking for --enable-bmpcombobox... yes
checking for --enable-button... yes
checking for --enable-calendar... yes
checking for --enable-caret... yes
checking for --enable-checkbox... yes
checking for --enable-checklst... yes
checking for --enable-choice... yes
checking for --enable-choicebook... yes
checking for --enable-collpane... yes
checking for --enable-colourpicker... yes
checking for --enable-combobox... yes
checking for --enable-comboctrl... yes
checking for --enable-commandlinkbutton... yes
checking for --enable-dataviewctrl... yes
checking for --enable-datepick... yes
checking for --enable-detect_sm... yes
checking for --enable-dirpicker... yes
checking for --enable-display... yes
checking for --enable-editablebox... yes
checking for --enable-filectrl... yes
checking for --enable-filepicker... yes
checking for --enable-fontpicker... yes
checking for --enable-gauge... yes
checking for --enable-grid... yes
checking for --enable-headerctrl... yes
checking for --enable-hyperlink... yes
checking for --enable-imaglist... yes
checking for --enable-infobar... yes
checking for --enable-listbook... yes
checking for --enable-listbox... yes
checking for --enable-listctrl... yes
checking for --enable-notebook... yes
checking for --enable-notifmsg... yes
checking for --enable-odcombobox... yes
checking for --enable-popupwin... yes
checking for --enable-prefseditor... yes
checking for --enable-radiobox... yes
checking for --enable-radiobtn... yes
checking for --enable-richmsgdlg... yes
checking for --enable-richtooltip... yes
checking for --enable-rearrangectrl... yes
checking for --enable-sash... yes
checking for --enable-scrollbar... yes
checking for --enable-searchctrl... yes
checking for --enable-slider... yes
checking for --enable-spinbtn... yes
checking for --enable-spinctrl... yes
checking for --enable-splitter... yes
checking for --enable-statbmp... yes
checking for --enable-statbox... yes
checking for --enable-statline... yes
checking for --enable-stattext... yes
checking for --enable-statusbar... yes
checking for --enable-taskbaricon... yes
checking for --enable-tbarnative... yes
checking for --enable-textctrl... yes
checking for --enable-timepick... yes
checking for --enable-tipwindow... yes
checking for --enable-togglebtn... yes
checking for --enable-toolbar... yes
checking for --enable-toolbook... yes
checking for --enable-treebook... yes
checking for --enable-treectrl... yes
checking for --enable-treelist... yes
checking for --enable-commondlg... yes
checking for --enable-aboutdlg... yes
checking for --enable-choicedlg... yes
checking for --enable-coldlg... yes
checking for --enable-filedlg... yes
checking for --enable-finddlg... yes
checking for --enable-fontdlg... yes
checking for --enable-dirdlg... yes
checking for --enable-msgdlg... yes
checking for --enable-numberdlg... yes
checking for --enable-splash... yes
checking for --enable-textdlg... yes
checking for --enable-tipdlg... yes
checking for --enable-progressdlg... yes
checking for --enable-wizarddlg... yes
checking for --enable-menus... yes
checking for --enable-miniframe... yes
checking for --enable-tooltips... yes
checking for --enable-splines... yes
checking for --enable-mousewheel... yes
checking for --enable-validators... yes
checking for --enable-busyinfo... yes
checking for --enable-hotkey... auto
checking for --enable-joystick... yes
checking for --enable-metafile... auto
checking for --enable-dragimage... yes
checking for --enable-accessibility... no
checking for --enable-uiactionsim... yes
checking for --enable-dctransform... yes
checking for --enable-webviewwebkit... yes
checking for --enable-palette... yes
checking for --enable-image... yes
checking for --enable-gif... yes
checking for --enable-pcx... yes
checking for --enable-tga... yes
checking for --enable-iff... yes
checking for --enable-pnm... yes
checking for --enable-xpm... yes
checking for --enable-ico_cur... yes
checking for --enable-dccache... yes
checking for --enable-ps-in-msw... yes
checking for --enable-ownerdrawn... yes
checking for --enable-uxtheme... yes
checking for --enable-wxdib... yes
checking for --enable-webviewie... yes
checking for --enable-autoidman... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
checking for ar... ar
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for langinfo.h... yes
checking for wchar.h... yes
checking for sys/select.h... yes
checking for cxxabi.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking size of short...
checking size of void *...
checking size of int...
checking size of long...
checking size of size_t...
checking size of long long...
checking size of wchar_t...
checking for va_copy... yes
checking whether the compiler supports variadic macros... yes
checking for _FILE_OFFSET_BITS value needed for large files...
checking if large file support is available... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether byte ordering is bigendian... no
checking for iostream... yes
checking if C++ compiler supports the explicit keyword... yes
checking for std::wstring in <string>... yes
checking for std::istream... yes
checking for std::ostream... yes
checking how to run the C++ preprocessor... g++ -E
checking type_traits usability... no
checking type_traits presence... no
checking for type_traits... no
checking tr1/type_traits usability... yes
checking tr1/type_traits presence... yes
checking for tr1/type_traits... yes
checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... yes
checking for libraries directories... /usr/lib64
checking for cos... no
checking for floor... no
checking if floating point functions link without -lm... no
checking for sin... yes
checking for ceil... yes
checking if floating point functions link with -lm... yes
checking for strtoull... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.... yes
configure: WARNING: Defaulting to the builtin regex library for Unicode build.
checking for zlib.h >= 1.1.... yes
checking for zlib.h... (cached) yes
checking for deflate in -lz... yes
checking for png.h > 0.90... yes
checking for png.h... (cached) yes
checking for png_sig_cmp in -lpng... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for tiffio.h... no
configure: WARNING: system tiff library not found, will use built-in instead
checking for lzma_code in -llzma... no
checking for jbg_dec_init in -ljbig... no
checking for expat.h... yes
checking if expat.h is valid C++ header... yes
checking for XML_ParserCreate in -lexpat... yes
checking for GTK+ version...
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 3.0.... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ , please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2. or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent. Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "build.py", line , in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "/tmp/pip-build-t_6afe/wxpython/buildtools/build_wxwidgets.py", line , in main
"Error running configure")
File "/tmp/pip-build-t_6afe/wxpython/buildtools/build_wxwidgets.py", line , in exitIfError
raise builder.BuildError(msg)
BuildError
Finished command: build_wx (.690s)
Finished command: build (.690s)
Command '"/usr/bin/python2" -u build.py build' failed with exit code . ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t_6afe/wxpython/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pnjkOu-record/install-record.txt --single-version-externally-managed --compile" failed with error code in /tmp/pip-build-t_6afe/wxpython/

主要错误摘录如下:

     *** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ , please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2. or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent. Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
File "build.py", line , in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File "/tmp/pip-build-t_6afe/wxpython/buildtools/build_wxwidgets.py", line , in main
"Error running configure")
File "/tmp/pip-build-t_6afe/wxpython/buildtools/build_wxwidgets.py", line , in exitIfError
raise builder.BuildError(msg)
BuildError
Finished command: build_wx (.690s)
Finished command: build (.690s)
Command '"/usr/bin/python2" -u build.py build' failed with exit code . ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-t_6afe/wxpython/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pnjkOu-record/install-record.txt --single-version-externally-managed --compile" failed with error code in /tmp/pip-build-t_6afe/wxpython/

所以首要任务是解决gtk+2.0是否安装,且安装正确了。

测试方法可以参见这个链接里()的测试程序,如果测试程序编译成功,且执行后出现GUI界面,则gtk+2.0就是安装成功的。

本文特地将测试程序和制作方法截取出来。

#vi helloworld.c
#include <gtk/gtk.h>

int main(int argc, char* argv[])
{
GtkWidget* window;
GtkWidget* label; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); label = gtk_label_new("Hello World."); gtk_container_add(GTK_CONTAINER(window), label); gtk_widget_show_all(window); gtk_main(); return ;
}
编译运行
gcc -o helloworld helloworld.c `pkg-config --cflags --libs gtk+-2.0`
./Helloworld

测试后确认,gui是可以出现的。另外,又用pkg-config,查看了gtk+的所有库,查看命令和结果如下:

 [root@gm lib]# pkg-config --list-all |grep gtk
gtk+-unix-print-2.0 GTK+ - GTK+ Unix print support
gtk+ GTK+ - GIMP Tool Kit
gtk+-x11-2.0 GTK+ - GTK+ Graphical UI Library (x11 target)
gtk+-2.0 GTK+ - GTK+ Graphical UI Library (x11 target)

再查看gtk的版本号:

 # 使用外部命令查看安装的gtk库版本

 $pkg-config --modversion gtk+    (查看1..x版本)

 $pkg-config --modversion gtk+-2.0  (查看 .x 版本)
6 2.24.31
 $pkg-config --version (查看pkg-config的版本)

 $pkg-config --list-all |grep gtk (查看是否安装了gtk) 

以上操作均证明gtk+2.0确实是安装了的。

问题是pip缺找不到gtk+2.0.

先把gtk2.0放在一边,我又仔细看下了下wxPython的官网,说macOS和window以外类unix不提供二进制形式,但提供源码或wheel包。请参考以下链接:

https://pip.pypa.io/en/stable/reference/pip_search/

https://wiki.wxpython.org/How%20to%20install%20wxPython

https://extras.wxpython.org/wxPython4/extras/linux/gtk2/centos-7/wxPython-4.0.4-cp27-cp27mu-linux_x86_64.whl (wheel下载)

https://wiki.wxpython.org/Gtk%20and%20Win32%20differences

下载linux的wheel后,直接执行pip install wxPython-4.0.4-cp27-cp27mu-linux_x86_64.whl 执行成功后,就可以执行python 你的gtk脚本了。

在Centos7上安装wxPython4.0.4的更多相关文章

  1. centos7上安装zabbix4.0

    zabbix4.0已经推出有一段时间了,针对之前版本做了很多优化配置,易用性得到提高,特别lts(long team support)长技术支持版本,官方说提供5年的稳定技术支持,在商业化运用上,是比 ...

  2. 【Zabbix】在CentOS7上安装Zabbix3.0

    Zabbix安装 首先说明一下,本文主要参考了[http://www.linuxidc.com/Linux/2016-11/137030.htm]和[http://www.cnblogs.com/XY ...

  3. 在CentOS7上安装Zabbix3.0

    #!/bin/bash # # .配置无人值守的安装,定义安装过程中需要用到的一些信息 # mysql_root_pw=root_pw mysql_zabbix_pw=zabbix_pw DBPass ...

  4. 在centos7上安装Jenkins

    在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...

  5. 在 CentOS7 上安装 zookeeper-3.4.9 服务

    在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/service ...

  6. 在 CentOS7 上安装 MongoDB

    在 CentOS7 上安装 MongoDB 1 通过 SecureCRT 连接至 CentOS7 服务器: 2 进入到 /usr/local/ 目录: cd /usr/local 3 在当前目录下创建 ...

  7. 在 CentOS7 上安装 MySQL5.7

    在 CentOS7 上安装 MySQL5.7 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建 ...

  8. 在 CentOS7 上安装 Tomcat9

    在 CentOS7 上安装 Tomcat9 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建目 ...

  9. 在CentOS7上安装JDK1.8

    在CentOS7上安装JDK1.8 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建目录 to ...

随机推荐

  1. himm的使用

    1.设置管脚复用 himm 0x200F0100 1 himm 0x200F0104 1 2.设置GPIO_DIR himm 0x201C0400 0xff 3.设置GPIO_DATA himm 0x ...

  2. gerrit工具的数据提交流程

    检查服务器有没有更新:1.检查服务器有没有更新git fetch如果有内容,代表服务器版本有更新,需要把本机修改暂存(第二步),拉下服务器内容(第三步)如果没有内容,代表服务器没有更新,跳至52.本地 ...

  3. 鏈接Redis報錯`AUTH` failed: ERR Client sent AUTH, but no password is set [tcp://127.0.0.1:6379]

    問題 鏈接Redis報錯`AUTH` failed: ERR Client sent AUTH, but no password is set [tcp://127.0.0.1:6379] 解決 啟動 ...

  4. [转]在ASP.NET Core中使用百度在线编辑器UEditor

    原文地址:https://www.cnblogs.com/durow/p/6116393.html 0x00 起因 最近需要一个在线编辑器,之前听人说过百度的UEditor不错,去官网下了一个.不过服 ...

  5. 剑指offer 7. 递归和循环 斐波那契数列

    题目描述 大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项(从0开始,第0项为0). n<=39 简简单单 废话不多说,直接上代码: public class Sol ...

  6. linux与C内存管理机制

    转自知乎专栏:https://zhuanlan.zhihu.com/p/51855842?utm_source=wechat_session&utm_medium=social&utm ...

  7. MVC4 5分页控件,支持Ajax AjaxOption支持

    MVC4 5分页控件,支持Ajax AjaxOption支持 /// <summary> /// MVC4 5分页控件,支持Ajax AjaxOption支持 beta 1.0 /// 用 ...

  8. 【java8】使用lambda表达式对List去重

    先收集再排序. public static void main(String[] args) { BookBo bookBo1 = new BookBo("1", "语文 ...

  9. 7.7 wordcnt.c 程序

    wordcnt.c 程序 #include <stdio.h> #include <ctype.h> // 为isspace() 函数提供原型 #include <std ...

  10. Mysql-12条优化技巧

    应用程序慢如牛,原因多多,可能是网络的原因.可能是系统架构的原因,还有可能是数据库的原因. 那么如何提高数据库SQL语句执行速度呢?有人会说性能调优是数据库管理员(DBA)的事,然而性能调优跟程序员们 ...