导航:首页 > 编程系统 > linuxjpeglibrary

linuxjpeglibrary

发布时间:2022-09-17 04:35:18

linux中jpeglib库文件我安装了,但是我运行自己写的代码老是找不到这个库

export LD_LIBRARY_PATH=/usr/local/lib

就可以了。但这个方法是一次性的,这个设置只保存在内存专,关闭终端再开启就没了。

网上搜索后属发现~/.bashrc文件在每次登陆和每次打开
shell 都读取一次,~/.bash_profile在登陆时读取一次,所以可以把配置语句写进其中一个:

[plain] view plain
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

可以直接命令行输入:

[plain] view plain
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' >> ~/.bashrc

也可以用vim编辑器打开编辑。
这样每次打开终端,系统就实现自动配置了。

② yum 怎么安装 jpeglib怎么安装

Linux下jpeglib库的安装详解
首先要下载所需的库压缩包:jpegsrc.v6b.tar.gz或 jpegsrc.v8b.tar.gz
然后将下载的压缩包随便放在和解压到你喜欢的地方。
# tar -zxvf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure --enable-shared
# make
/以下代码是在usr/local目录下建立库文件安装目录
/如果没有权限建立输入命令sudo –s 回车,然后按提示输入你的登录密码
# mkdir /usr/local/jpeg6
# mkdir /usr/local/jpeg6/include
# mkdir /usr/local/jpeg6/lib
# mkdir /usr/local/jpeg6/bin
# mkdir /usr/local/jpeg6/man
# mkdir /usr/local/jpeg6/man/man1
# make install
#----configuration information----
echo "---------------------------------------------------------------------"
echo "please add following lines in you /etc/profile"
echo "("
echo " tip:"
echo " you can add these lines in a file named /etc/profile.jpeg,"
echo " and then add a line on the end of /etc/profile:"
echo " . /etc/profile.jpeg"
echo " it is simple,:)"
echo "):"
echo " PATH=""$""PATH:$jpeg/bin"
echo " CPLUS_INCLUDE_PATH=""$""CPLUS_INCLUDE_PATH:$jpeg/include"
echo " LD_LIBRARY_PATH=""$""LD_LIBRARY_PATH:$jpeg/lib"
echo " LIBRARY_PATH=""$""LIBRARY_PATH:$jpeg/lib"
echo " MANPATH=""$""MANPATH:$jpeg/man"
echo ""
echo " export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH"
这就安装完了吗???no!!!
你可能在编译自己写的程序的时候会遇到一下问题终端提示
/tmp/cc9DqMJZ.o: In function `jpeg_compress':
server1214.c:(.text+0x4f5): undefined reference to `jpeg_std_error'
server1214.c:(.text+0x519): undefined reference to `jpeg_CreateCompress'
server1214.c:(.text+0x59b): undefined reference to `jpeg_stdio_dest'
server1214.c:(.text+0x5d1): undefined reference to `jpeg_set_defaults'
server1214.c:(.text+0x5ef): undefined reference to `jpeg_set_quality'
server1214.c:(.text+0x605): undefined reference to `jpeg_start_compress'
server1214.c:(.text+0x64c): undefined reference to `jpeg_write_scanlines'
server1214.c:(.text+0x66a): undefined reference to `jpeg_finish_compress'
server1214.c:(.text+0x686): undefined reference to `jpeg_destroy_compress'
collect2: ld 返回 1

解决办法在编译命令后加-ljpeg
例 gcc –o **** ****.c –ljpeg
Ok 成功!!!!

③ 电脑的专业术语有哪些

NTFS (NT 档案系统 NT File System)
NOS (网路作业系统 Network Operation System) MIDI (乐器数位介面 Musical
Instrument Digital Interface )
MAPI (讯息应用稀式介面 Messaging Application Programming Interface )
MPEG (动画专家群组 Motion Picture Experts Group )
MCI (媒体控制介面 Media Control Interface )
LCD (液晶显示 Liquid Crystal Display )
JPEG (联合影像专家群组 Joint Photographic Experts Group )
ISDN (整合服务数位网路 Integrated Services Digital Network )
ISA (工业标准架构 Instry Standard Architecture )
EISA (延伸型工业标准架构 Extended Instry Standard Arhitecture )
IRQ (中断要求 Interrupt Request )
I/O (输入/出 Input/Output )
IDE (整合型电子装置 Integrated Device Elec-tronics 或智慧型电子驱动器
Intelligent Drive Electronics )
E-IDE(加强整合型电子装置规范 Enhanced Inte-grated Device Electronics
或加强智慧型电子驱动器规范 Enhanced Intelligent Drive Electronics)
HPFS (高效能档案系统 High Performance File System )
FPU (浮点运算单元 Floating-Point Unit )
GDI (绘图装制介面 Graphics Device Interface )
FTP (档案传输协定 File transfer Protocol )
FAT (档案配制表 File Allocation Table )
EEPROM(电子可抹稀式化唯读记忆体 Electri-cally Erasable Programmable
Read-Only Memory)
EDRAM (加强型动态随机存取记忆体 Enhanced Dynamic Random Access
Memory )
EDO RAM(延伸资料输出随机存取计忆体 Extended Data-Out Random Access
Memory )
DRAM (动态随机存取记忆体 Dmic Random Access Memory )
DSP (数位讯号处理器 Digital Signal Processor )
DMA (直接记忆存取 Direct Memory Access )
DLL (动态联结稀式库 Dynamic Link Library)
DDE (动态资讯交换 Dynamic Data Exchange )
DCI (显示控制介面 Display Control Interface )
CRT (阴极射线管 Cathode-Ray Tube )
CRC (环重复检查码 Cyclical Rendancy Check )
CPU (中央处理单元 Central Processing Unit )
CMOS RAM (互补金属氧化半导体随机存取记忆体 Complementary Metal-
Oxide Semiconctor Random Access Memory )
BIOS (基本输出入系统 Basic Input/Output System )
ASCII (美国国家资讯交换标准码 American Stan-dard Code for Information
Interchange )
API (应用稀式介面 Application Progrmming Interfacel l)
ASCII ((美国国家资讯交换标准码 American Stan-dard Code for
Access 存取
Access Time 平均存取时间
Apache 伺服软体
Architecture 架构
Areal Density 磁录密度
Arithmetic and Logic Unit (ALU) 算术逻辑单元
Arm Actuator磁头驱动臂
Array 阵列
Artificial Intelligence(AI) 人工智慧
Asychronous Transfer Mode(ATM) 非同步传送模式
Asymmetric/Asynchronous Digital Subscriber Line(ADSL) 非对称数位用户回路
Asynchrinous 非同步
Asynchronous Time Division Multiplexing (ATDM) 异步分时多工
非同步传输模式 Asynchronous Transfer Mode (ATM)
AT附属装置 AT attachment(ATA)
AT Attachment介面 ATA
AMR附加卡 Audio Modem Riser (AMR)
声频回应单元 Audio Response Unit (ARU)
授权 Authorization
授权码 Authorization Code
自动磁头归定位 Auto-park
辅助记忆装置 Auxiliary Memory
可用度 Availability
平均存取时问 Average Access Time
平均搜寻时间 Average Seek Time
平均传输速率 Average Transfer Rate
桥接器 Bridge
网际网路通讯协定 Internet Protocol (IP)
骨干 Backbone
干线网路 Backbone (Core)Network
备份装置 Backup Device
频宽 Bandwidth
基频带 Base Band
基本记忆体 Base Memory
电池 Battery
二进制 Binary
位元 Binary Digit(BIT)
位元密度 Bit Densiry
位元位移 Bit Shift
每秒位元数 Bits Per Second(BPS)
蓝芽 Bluetooth
启动 Boot
启动磁区 Boot Sector
桥接器 Bridge
亮度 Brightness
缓冲器 Buffer
缆线数据机 Cable MODEM
快取缓冲器 Cache Buffer
快取命中 Cache Hit
快取记忆体 Cache Memory
快取记忆体 Cache Memory/Cache RAM(CACHE)
快取记忆体 Cache Memory/SmartCache
客户服务中心 Call Center
使用者代码 Caller ID
影像撷取介面卡 Capture Card
载波 Carrier
晶片 Chip
晶片组 Chipset
时脉产生器 Clock Generator
MAC相容型电脑 Clone MAC
回路 Close loop
丛集 Cluster
磁簇 Cluster
等角速度 Constant Angular Velocity (CAV)
等线速度 Constant Linear Velocity (CLV)
内容切换 Context Switch
对比 Contrast
控制面板 Control Panels
硬碟控制器 Controller
色收敛 Convergence
CPU周期 CPU Cycle
CPU当机 CPU Hack
CPU暂停 CPU Hold
CPU中断状态 CPU Interrupt
CPU不动作 CPU NOP
更改CPU表面印刷 CPU Remarking
CPU的启始状态 CPU Reset
中央处理器插槽 CPU Socket
磁柱 Cylinder
磁柱/磁头/磁扇 Cylinder/Head/Sector(CHS)
资料汇流排 Data Bus
资料压缩 Data Compressing
资料加密标准 Data Encryption Standard (DES)
资料传输速率 Data Transfer rate
磁碟阵列 Disk Array
延伸记忆体 eXtend Memory System(XMS)
延伸型资料输出式随机存取记忆体 Extended Data-Out RAM(EDO RAM)
延伸视讯图形阵列介面卡 eXtended Graphic Array(XGA)
防火墙 Firewall
韧体 Firmware
快阵记忆体 Flash Memory
平坦式记忆体 Flat Memory
Fliaming
覆晶技术 Flip Chip
浮点运算器 Floating Point Unit(FPU)
软碟机 Floppy Disk Drive(FDD)
频率 Frequency
频率响应 Frequency Response
分频多工存取技术 Frequency-Division Multiple Access (FDMA)
全彩 Full Color
全双工 Full Duplex
全光纤网路 Full Fibre Network
全双工服务 Full-Duplex Service
全双工/半双工 Full-Duplex/Half-Duplex
全高型磁碟机 Full-height Drive
函数 Function
硬式磁碟机 Hard Disc Drive
Hard Error
磁头 Head
磁头撞毁 Head Crash
磁碟停放区域 Head Landing Zone
高速动态随机存取记忆体 High Speed Dynamic Random Access Memory
(HSDRAM)
集线器 Hub
集线器管理介面 Hub Management Interface (HMI)
光纤同轴混合网路 Hybrid Fiber Coaxial (HFC)
Hyper Text Transsport Protocol(HTTP)
超链结 Hyperlink
超媒体 Hypermedia
超文件 Hypertext
超文件标示语言 Hypertext Markup Language (HTML)
超文件传输协定 Hypertext Transport Protocol (HTTP)
红外线传输功能 Infrared (IR)
红外线标准协会 Infra-red Data Association (IRDA)
输入与输出 Input/Output(I/O)
电子电机工稀师协会 Institute of Electrical and Electronics Engineers (IEEE)
整数单元 Integer Unit
积体电路 Integrated Circuit(IC)
电子整合装置或是智慧型电子驱动器 Integrated Device Electronics(IDE)
爪哇稀式语言 java
爪哇语言2精简版 Java 2 Micro Edition (J2ME)
爪哇资料库连结 Java Database Connectivity (JDBC)
精灵软体 Java for Intelligent Network Interface (JINI)
爪哇伺服小稀式开发工具组 Java Servelet Development Kit (JSDK)
爪哇伺服网页 Java Server Page (JSP)
爪哇虚拟机器 Java Virtual Machine (JVM)
爪哇咖啡豆 JavaBeans
爪哇描述语言 javascript
雷射印表机 Laser Printer
等待时间 Latency
线路配置 Layout
专线 Leased Line
第一层/第二层快取记忆体 Level 1/Level 2 Cache(L1)
第一层/第二层快取记忆体 Level 1/Level 2 Cache(L2)
简易资料存取协定 Lightweight Data Access Protocol (LDAP) 1
链结器 Linker
Linux作业系统 Linux
液晶显示器 Liquid Crystal Display(LCD)
负载平衡 Load Balancing
区域网路 Local Area Network (LAN)
区域汇流排 Local Bus
低阶格式化 Low Level format
机器语言 Machine Language
百万位元组 Megabyte(MB)
磁光碟片 Meganeto-Optical(MO) 1
记忆体 MEMORY
快阵记忆卡 Memory Stick (MS)
Merced微处理器 Merced
讯息伫列 Message Queue
微通道架构 Micro Channel Architrcture(MAC)
CPU微码 Micro Code
微细胞基地台 Microcell
MNP协定 Microcom Network Protocol
微电子机械系统 Micro-Electromechanical Systems (MEMS)
微处理器 Microprocessor
模组 Mole
电脑监视器/电脑显示器/电脑萤幕 Monitor
主机板或母板 Motherboard/Mainboard
动态JPEG压缩 Motion JPEG(M JPEG)
动态影像专业团体 Motion Picture Experts Grop(MPEG)
多频道多点分配系统 Mulite-channel Multi-Point Sidtribution System(MMDS)
多媒体储存卡 Multi Media Card (MMC) 1
多重应用作业系统 Multi-application Operation System (MULTOS)
多功能事务机 Multi-Function Printer(MPF)
多媒体延伸指令集 MultiMedia eXtension (MMX)
MMS电子便利站 Multimedia Station (MMS)
多工器 Multiplexer(MUX)
高速协定初步标准 Multiprotocol Label Switching (MPLS)
多用途网路邮件延伸格式 Multipurpose Internet Mail Extension (MIME)
多工 Multitasking
多层网路架构 Multi-tier (M-TIER)
乐器数位介面 Musical Instrument Digital Interface (MIDI)
作业系统 Operating System (OS)
光学文字辨识 Optical Character Recognition(OCR)
光学文字辨识系统 Optical Character Recognition (OCR)
原始设备制造商 Original Equipment Manufacturer (OEM)
超频 Over Clock
操控於萤光幕 On-Screen Display(OSD)
光域 Raster
唯读记忆体 Read Only Memory(ROM)
真实模式 Real Mode
扫描器 Scanner 1
扫瞄 Scanning
剪贴簿 Scrapbook
磁扇 sector
伺服磁轨 Sector Track
串列埠 serial port
伺服器 Server
服务 Service
交换式集线器 Switch HUB
对称式处理 Symmetric Multiprocessing(SMP)
同步 Synchronous
同步动态随机存取记忆体 Synchronous DARM(SDRAM)
同步资料链结控制 Synchronous Data Link Control (SDLC)
同步数位阶层 synchronous Digital Hierarchy(SDH)
同步光纤网路 synchronous Optical Network(SONET)
系统档案夹 System Folder
系统分析师 System Analyst
系统管理模式 System Managerment Mode(SMM)
系统分析 Systems Analysis (SA)
终端伺服器 Temminal Server
终端机 Terminal
热转印式印表机 Thermal electric Printer
主动式电晶薄膜式电晶体 Thin Film Transistor(TFT)
磁轨 Track
轨迹球 Track ball
轨迹板/触摸板 Track Pad/Touchpad
轨迹点 Track point
零轨 Track 0
流量 Traffic 117
传输控制协定 Transmission Control Protocol/Internet Protocol (TCP/IP)
光罩 Transparent Media Adapter (TMA)
垃圾桶 Trash
特洛伊木马 Trojan Horse
全彩 True Color
万国码 Uniwxxxcode-style(UNICODE)
记忆体共用架构 Unified Memory Architecture(UMA)
不断电系统 Uninterrupted Power System(UPS)
通用串列汇流排 Universal Serial Bus(USB)
视讯会议系统 Video conferencing
视讯图形阵列介面卡 Video Graphics Array (VGA)
随选视讯系统 Video On Demand (VOD)
垂直 Vertical
垂直扫瞄频率 Vertical Scanning Frequency
虚拟装置驱动稀式 Virtual Device Driver(VXD)
虚拟网际首页 Virtual Home
虚拟机器 Virtual Machine(VM)
虚拟记忆体 Virtual Memory
虚拟私有网路 Virtual Private Network (VPN)
虚拟实境 Virtual Reality(VR)
虚拟萤幕 Virtual Screen
电脑病毒 Virus
全球资讯网 World Wide Web (WWW)
全球资讯网协会 World Wide Web Consortium (W3C)
多国语文 WorldScript
间接写入与直接写入 Write Back/Write Through(WB/BT)
无线应用通讯协定 Wireless Application Protocol(WAP)
无线应用软体协定 Wireless Application Protocol (WAP)
无线数据机 Wireless MODEM
精灵 Wizard
区域位元纪录法 Zone Bit Recording(ZBR)
电脑(Computer)是一种利用电子学原理根据一系列指令来对数据进行处理的机器。电脑可以分为两部分:软件系统和硬件系统。第一台电脑是1946年2月15日在美国宾夕法尼亚大学诞生的ENIAC通用电子计算机。
人们把没有安装任何软件的计算机称为裸机。随着科技的发展,现在新出现一些新型计算机有:生物计算机、光子计算机、量子计算机等。 1954年5月24日,晶体管电子计算机诞生。
回答于 2018-04-03
电脑计算机培训,学完一个周期要多久?
值得一看的电脑计算机培训相关信息推荐
近来,看见不少大学生为了好找工作,出去参加各种各样的语言培训,c+等等,前段时间自己家的人,数学专业,也想出国留学,可是.电脑计算机培训就业保薪学院,入学既可以签订保薪,8000就业协议,保证就业
北京佳音旗舰科技发展有限公司广告
培训机构会员卡管理系统_上淘宝_专业品牌_淘你喜欢的都在这里
最近1小时前有人下载
但是,每一个企业都有自己的特色和人员构成,所以管理方式也是不一而足.培训机构会员卡管理系统,购物上[淘宝],优选材质,用的舒心,在线下单,省时省力,你要的好货尽在淘宝网,安心享受网购乐趣
杭州易宏广告有限公司广告
更多专家
电脑的专业术语有哪些?
专家1对1在线解答问题
5分钟内响应 | 万名专业答主
马上提问
最美的花火 咨询一个电子数码问题,并发表了好评
lanqiuwangzi 咨询一个电子数码问题,并发表了好评
garlic 咨询一个电子数码问题,并发表了好评
188****8493 咨询一个电子数码问题,并发表了好评
篮球大图 咨询一个电子数码问题,并发表了好评
动物乐园 咨询一个电子数码问题,并发表了好评
AKA 咨询一个电子数码问题,并发表了好评
共1条评论
想互撩,先评论一句
热心网友赞
电脑的专业术语有哪些
刚刚回复·删除
— 你看完啦,以下内容更有趣 —
2022全国计算机技术与软件专业技术-软考培训中心
51CTO精培15年精心打造软考培训品牌,众多软考学员的选择。全国计算机技术与软件专业技术薛大龙团队授课,980元起学软考,全国计算机技术与软件专业技术报名与培训中心。
广告
电脑方面的专业术语有哪些?
电脑硬件啊?网络下就是了,CPU GPU 显卡网卡.....很多的,难得打字
匿名用户
  回答于 2013-09-21
2点赞426浏览
计算机中常见的专业术语有哪些?
TCP/IP;OSI/ISO;FTP;等等多的很!
玄冰心倩影
  回答于 2012-05-10
196浏览
我想知道电脑有什么专业术语有什么
最新电脑常见术语速查手册 陈英 在使用电脑的过程中,面对一些相对专业的名词术语和专业缩略语,经常搞得人云里雾里。本手册按字母序作为索引,收录词目200余条,在内容上力求涵盖电脑应用的方方面面,希望能对你在使用电脑的过程中有所帮助。 ●Aactive Network(动态网络) 动态网络是这样一种网络,该网络上的各个节点经过编程处理,可以依据通过该节点的信息执行定制化的任务。例如,一个节点可以经过编程或者定制化处理,以一个单独用户为基础处置信息包,或者处置不同于其他信息包的多点传送信息包。动态网络的这种处理方法,在一个由移动用户构成的网络中显得特别重要。 ●AC 97(音响数字/模拟转换) AC 97即音响数字/模拟转换97。AC 97能使PC与一般音响系统相容,以配合家用电器的标准。该规格支持一些新的功能,如支持Modem等。 ●Access Control(访问控制) 按用户身份及其所归属的某预定义组来限制用户对某些信息项的访问,或限制对某些控制功能的使用。访问控制通常用于系统管理员控制用户对服务器、目录、文件等网络资源的访问。 ●ACL(访问控制表) ACL(Access Control List,访问控制表)。用户和设备可以访问的那些现有服务和信息的列表。用户必须具有相应的授权才能修改目标的ACL。通常要求用户提供注册姓名和口令,它是用来保证系统安全性的一种手段。 ●ACOPS(自动CPU过热保护) ACOPS(Automatic CPU Overheat Prevention System)特指一类计算机主板的一种功能。此类主板在CPU插槽的中央有一个温度传感器,当CPU散热不佳或散热风扇不转导致CPU温度超出安全范围时,系统会通过喇叭发出警告并自动执行降温程序。ACOPS有自己独立的电路和软件,无需任何驱动程序来启动。 ●Active Directory(活动目录) Active Directory是Windows 2000的目录服务,它取代了Windows NT 4.0版中的安全账户管理器(SAM)。

④ linux 安装imagemagick怎么看是否成功

由于没有图形化界面的支持,在Linux(CentOS 5.4 x64)上的配置相对Windows XP还是麻烦了一点。

1、下载ImageMagick和JMagick的源文件(http://downloads.jmagick.org/6.4.0/):ImageMagick-6.4.0.-0tar.gz 和 jmagick-6.4.0-src.tar.gz。

2、解压并安装ImageMagick:
# tar xzvf ImageMagick-6.4.0-0.tar.gz
# cd ImageMagick-6.4.0
# ./configure --enable-shared --without-perl
# make
# make install
# make check
安装完成后,运行convert -version命令检测,应该会出现:
Version: ImageMagick 6.4.0 08/31/10 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
convert默认安装到了/usr/local/bin下面,上面的命令可能提示找不到convert命令。那么可以在/usr/bin下面创建一个到/usr/local/bin/convert的链接:
# cd /usr/bin
# ln -s /usr/local/bin/convert convert
# convet -version

3. 修改配置文件:
在/etc/profile中增加:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

在/etc/ld.so.conf中增加:/usr/local/lib

4. 在安装JMagick之前先配置环境变量,尤其是JAVA_HOME,否则编译时会出现:JMagick configure: error: 'Unable to locate Java directories'的错误。
# export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0x86_64
# export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
# export JAVA_BIN=$JAVA_HOME/bin
# export JRE_HOME=$JAVA_HOME/jre
# export PATH=$PATH:$JAVA_BIN
# export JAVA_HOME CLASSPATH PATH

5. 安装JMagick。
# tar xzvf jmagick-6.4.0-src.tar.gz
解压到了文件夹6.4.0中,为了便于区分,重命名该文件夹:
# mv 6.4.0 jmagick-6.4.0
# cd jmagick-6.4.0
# ./configure
# make all
# make install
将生成的libJMagick-6.4.0.so复制到jre中的lib/amd64(amd64可能在不同的硬件架构会有不同的名字,如i386)文件夹中,同时重命名为libJMagick.so。
# cd /usr/local/lib
# cp libJMagick-6.4.0.so $JRE_HOME/lib/amd64
# mv libJMagick-6.4.0.so libJMagick.so
将jmagick-6.4.0.jar复制到$JRE_HOME/lib/ext文件夹下,并重命名为jmagick.jar
# cp jmagick-6.4.0/lib/jmagick-6.4.0.jar $JRE_HOME/lib/ext/jmagick.jar

至此就配置完毕了。

6. 使用yum命令也可以安装ImageMagick,不过版本是6.2.8。因为不太确定是否可以和6.4.0的so以及jar兼容,就将它卸载了,然后按照上面的步骤重新安装6.4.0。

后续
今天换了一台服务器安,在安装ImageMagick时,出现了新的问题:
./magick/xwindow-private.h:27:21: error: X11/Xos.h: No such file or directory
解决方法:
查找提供Xos.h文件的包
# yum provides */Xos.h
会得到一个软件包的列表:
xorg-x11-proto-devel-7.1-13.el5.i386 : X.Org X11 Protocol headers
Repo : base
Matched from:
Filename : /usr/include/X11/Xos.h

安装xorg-x11-proto-devel-7.1-13.el5.i386即可
yum install xorg-x11-proto-devel

yum install libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel
./configure --prefix=/usr/local/ImageMagick-6.4.0 --without-bzlib --with-jpeg=yes --with-jp2=yes --with-png=yes --without-x

⑤ linux中编译出现Wrong JPEG library version: library is 62, caller expects 80

Wrong JPEG library version: library is 80, caller expects 62 这个是遇到的问题,
我QQ601269358,一起解决。。

⑥ 如何使用oprofile对软件做profiling

下载的是linux-xlnx-xilinx-v14.7.tar.gz

解压缩后,用以下命令调出Linux kernel的配置界面:
export ARCH=arm
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
make xilinx_zynq_defconfig
make xconfig 或者make menuconfig

在配置界面上将以下两项勾上:
General setup --->
[*] Profiling support
<*> OProfile system profiling

然后make uImage即可生成新的uImage,用来替换Xilinx Linux pre-built 14.7中的Linux kernel image。同时我们也需要vmlinux来检查profiling的结果。


Oprofile需要popt, bfd, liberty库,要在嵌入式单板上使用这些库,需要手工完成交叉编译。

针对popt 1.7,用以下命令完成编译:
./configure --prefix=/home/wave/xilinx/oprofileprj/rootfs --host=arm-xilinx-linux-gnueabi --with-kernel-support --disable-nls && make && make install

针对binutils 2.24,用以下命令完成编译:
./configure --host=arm-xilinx-linux-gnueabi --prefix=/home/wave/xilinx/oprofileprj/rootfs --enable-install-libbfd --enable-install-libiberty --enable-shared && make && make install
不过--enable-install-libiberty没有效果,所以需要手工把libiberty.a和libiberty.h拷贝到相应的位置。

针对oprofile 0.9.9,用以下命令完成编译:
./configure --host=arm-xilinx-linux-gnueabi --prefix=/home/wave/xilinx/oprofileprj/rootfs --with-kernel-support --with-binutils=/home/wave/xilinx/oprofileprj/rootfs && make && make install
配置过程结束后可能会有以下提示,因为没有打算用GUI和profile JITed code,所以直接忽视之。
config.status: executing libtool commands
Warning: QT version 3 was requested but not found. No GUI will be built.
Warning: The user account 'oprofile:oprofile' does not exist on the system.
To profile JITed code, this special user account must exist.
Please ask your system administrator to add the following user and group:
user name : 'oprofile'
group name: 'oprofile'
The 'oprofile' group must be the default group for the 'oprofile' user.

将编译完成的uImage,vmlinux,oprofile binary,重新编译的没有-pg的libjpeg binary以及tool chain的libc打包放到SD卡中,准备在ZC706开发板上尝试profile djpeg。

三. 运行Oprofile

正常启动嵌入式Linux后,在开发板的console上一次输入以下命令:

mount /dev/mmcblk0p1 /mnt

mkdir -p /home/root/work
cd /home/root/work
tar zxvf /mnt/jpeg-bin-nopg.tar.gz
cd jpeg-bin/bin
cp /mnt/park-2880x1800.jpg .
export LD_LIBRARY_PATH=/home/root/work/jpeg-bin/lib

cd /home/root/work
tar zxvf /mnt/rootfs.tar.gz
cd rootfs
chown root:root -R *
cp -R bin/* /usr/bin
cp -R lib/* /lib
cp /bin/which /usr/bin
cp /bin/dirname /usr/bin
mkdir -p /home/wave/xilinx/oprofileprj/rootfs/share
cp -R ./rootfs/* /home/wave/xilinx/oprofileprj/rootfs

cd /home/root/work
tar zxvf /mnt/libc.tar.gz
cp ./lib/libstdc*.* /lib

mkdir -p /home/wave/xilinx/libjpeg
cd /home/wave/xilinx/libjpeg
tar zxvf /mnt/jpeg-9.tar.gz

cp /mnt/vmlinux /home/root/work

cd /home/root/work/jpeg-bin/bin

opcontrol --init
opcontrol --vmlinux=/home/root/work/vmlinux
opcontrol --setup --event=CPU_CYCLES:100000::0:1 --session-dir=/home/root/

operf --vmlinux /home/root/work/vmlinux ./djpeg -bmp park-2880x1800.jpg > result.bmp
opreport -l ./djpeg

完成这一步后,我们就可以看到profiling的结果了,在笔者的平台上看到的内容的主要部分如下:
root@zynq:~/work/jpeg-bin/bin# opreport -l ./djpeg
Using /home/root/work/jpeg-bin/bin/oprofile_data/samples/ for samples directory.
CPU: ARM Cortex-A9, speed 666667 MHz (estimated)
Counted CPU_CYCLES events (CPU cycle) with a unit mask of 0x00 (No unit mask) count 100000
samples % image name symbol name
15293 58.6253 libc-2.17.so /lib/libc-2.17.so
2044

⑦ linux配置源代码包时出现下面错误

"exact error that occured. This usually means GLIB is incorrectly installed"
是不是由于GLIB的版本太低了?查看你的软件的readme啊,确认你的系统是否满足所有依赖关系。

⑧ Linux系统下PHP-FPM的安装和配置教程

基本安装方法
安装工具包
$
sudo
apt-get
install
python-software-properties
添加ppa源
$
sudo
add-apt-repository
ppa:yola/php5
安装php5-fpm
sudo
apt-get
update
sudo
apt-get
install
php5-fpm
其它必要的软件安装接
sudo
apt-get
install
nginx
配置php-fpm
php-fpm的解析器是C/S结构,它的配置文件位于:
(1)/etc/php5/fpm/php-fpm.conf
(2)/etc/php5/fpm/pool.d/
一般没什么严格的配置的要求,或者说这块我还没有具体的研究每个配置参数的意义
我采用了tcp模式与fastcgi进程进行连接,因此我修改了tcp监听的地址和端口,修改了一下监视目录的名称,这里不做具体详细解释了,大家可以参考官方文档根据自己的需求进行配置
重启php5-fpm
安装提示错误解决
如果服务器的系统源中没有php5-fpm,安装的时候会提示:
Reading
state
information...
Done
E:
Couldn't
find
package
php5-fpm
解决办法
1.
添加非官方的源到
/etc/apt/sources.list
echo
"deb
http://ppa.launchpad.net/brianmercer/php/ubuntu
lucid
main"
>>
/etc/apt/sources.list
echo
"deb-src
http://ppa.launchpad.net/brianmercer/php/ubuntu
lucid
main"
>>
/etc/apt/sources.list
2.
安装php5-fpm
sudo
apt-get
update
&&
sudo
apt-get
install
php5-fpm
3.
安装php扩展组件
sudo
apt-get
install
php-apc
php5-curl
php5-gd
php5-imagick
php5-mysql\
php5-memcache
php5-memcached
php5-mcrypt
4.
启动php-fpm
sudo
/etc/init.d/php5-fpm
start
php.in位于/etc/php5/fpm/php.ini
php-fpm.ini位于/etc/php5/fpm/php5-fpm.conf
php-fpm启动时报错
PHP
Warning:
PHP
Startup:
Unable
to
load
dynamic
library
'/usr/lib/php5/20060613+lfs/gd.so'
-
/usr/lib/php5/20060613+lfs/gd.so:
undefined
symbol:
gdImageCreateFromJpeg
in
Unknown
on
line
0
locate
libgd
查看gd的动态库位置,如果/usr/local/lib/目录里有则
rm
/usr/local/lib/libgd*
重启php-fpm即可
去掉php-fpm启动时警告提示信息
PHP
Deprecated:
Comments
starting
with
'#'
are
deprecated
in
/etc/php5/fpm/conf.d/imagick.ini
on
line
1
in
Unknown
on
line
0
把#变成;即可去掉该提示

⑨ 如何使用oprofile对软件做profiling

关于Xilinx Zynq-7000带来的新的系统设计思路,以及Profiling的对象libjpeg,前文已经描述过了,再此不再赘述。

一. Oprofile简介

Profiling是对不同性能特征的数据的形式化总结或分析,它通常以图形和表的形式出现。它提供为特定的处理器事件收集的采样百分数或数 量,比如cache miss rate、TLB miss rate等等。一般来说,主要目的是为了找出软件中的性能瓶颈,然后有针对性的优化以提升软件的整体性能。

Oprofile 是用于 Linux 的若干种评测和性能监控工具中的一种。它可以工作在不同的体系结构上,包括ARM, PowerPC, MIPS, IA32, IA64 和 AMD Athlon等等。它的开销很小,从Linux 2.6 版起,它被包含进了Linux内核中。

Oprofile可以收集有关处理器事件的信息,帮助用户识别诸如循环的展开、cache的使用率低、低效的类型转换和冗余操作、错误预测转移 等问题。Oprofile是一种细粒度的工具,可以为指令集或者为函数、系统调用或中断处理例程收集采样。Oprofile 通过取样来工作。使用收集到的评测数据,用户可以很容易地找出性能问题。

通过监察CPU的hardware events,oprofile可以在运行状态下对整个Linux系统进行profiling。Profiling的对象可以是Linux kernel (包括moles和interrupt handlers), shared libraries或者应用程序。

从0.9.8版本开始,oprofile支持Perf_events profiling mode模式。应用程序operf被用来控制profiling过程;而在legacy mode下,是通过opcontrol脚本和oprofiled daemon来完成的。Operf不再象legacy mode那样需要OProfile kernel driver,它直接和Linux Kernel Performance Events Subsystem打交道。使用operf,就可以用普通用户的身份来profiling用户的应用程序了,当然如果需要对整个系统来profiling 的时候还是需要root权限的。

如果硬件不支持OProfile使用performance counters,OProfile就只能工作在Timer Mode下了。Timer Mode只能在legacy profiling mode下使用,即只能通过opcontrol脚本来控制。

⑩ 如何使用oprofile对软件做profiling

关于Xilinx Zynq-7000带来的新的系统设计思路,以及Profiling的对象libjpeg,前文已经描述过了,再此不再赘述。

一. Oprofile简介

Profiling是对不同性能特征的数据的形式化总结或分析,它通常以图形和表的形式出现。它提供为特定的处理器事件收集的采样百分数或数 量,比如cache miss rate、TLB miss rate等等。一般来说,主要目的是为了找出软件中的性能瓶颈,然后有针对性的优化以提升软件的整体性能。

Oprofile 是用于 Linux 的若干种评测和性能监控工具中的一种。它可以工作在不同的体系结构上,包括ARM, PowerPC, MIPS, IA32, IA64 和 AMD Athlon等等。它的开销很小,从Linux 2.6 版起,它被包含进了Linux内核中。

Oprofile可以收集有关处理器事件的信息,帮助用户识别诸如循环的展开、cache的使用率低、低效的类型转换和冗余操作、错误预测转移 等问题。Oprofile是一种细粒度的工具,可以为指令集或者为函数、系统调用或中断处理例程收集采样。Oprofile 通过取样来工作。使用收集到的评测数据,用户可以很容易地找出性能问题。

通过监察CPU的hardware events,oprofile可以在运行状态下对整个Linux系统进行profiling。Profiling的对象可以是Linux kernel (包括moles和interrupt handlers), shared libraries或者应用程序。

从0.9.8版本开始,oprofile支持Perf_events profiling mode模式。应用程序operf被用来控制profiling过程;而在legacy mode下,是通过opcontrol脚本和oprofiled daemon来完成的。Operf不再象legacy mode那样需要OProfile kernel driver,它直接和Linux Kernel Performance Events Subsystem打交道。使用operf,就可以用普通用户的身份来profiling用户的应用程序了,当然如果需要对整个系统来profiling 的时候还是需要root权限的。

如果硬件不支持OProfile使用performance counters,OProfile就只能工作在Timer Mode下了。Timer Mode只能在legacy profiling mode下使用,即只能通过opcontrol脚本来控制。

Oprofile的website为:http://oprofile.sourceforge.net/

可以支持的处理器的hardware event类型:http://oprofile.sourceforge.net/docs/

对于Zynq-7000来说,http://oprofile.sourceforge.net/docs/armv7-ca9- events.php 列出了ARM Cortex-A9内核PMU(Performance Monitor Unit)所支持的所有hardware event种类,可以看出oprofile可以支持很多深入处理器内部的分析。

http://oprofile.sourceforge.net/examples/ 提供了一些oprofile生成的结果,可以方便开发者在开始使用之前了解oprofile能够做到哪些事情。

Oprofile的详细使用文档:http://oprofile.sourceforge.net/doc/index.html

Oprofile的优势:

? 比较低的运行开销

? 对被profiling的对象影响很小

? 可以profiling中断服务程序(interrupt handlers)

? 可以profiling应用程序和shared libraries

? 可以profiling dynamically compiled (JIT) code

? 可以对整个系统做profiling

? 可以观察CPU内部的细节,例如cache miss rate

? 可以多源代码做annotation

? 可以支持instruction-level的profiling

? 可以生成call-graph profiles

不过OProfile也不是万能的,它也有自己的局限性:

? 只能在x86, ARM, 和PowerPC架构上生成call graph profiles

? 不支持100%精确的instruction-level profiling

? 对dynamically compiled (JIT) code profiling的支持还不完善。

无论如何,Oprofile的功能都比gprof要强很多,代价是配置起来会比较麻烦。

二. 编译Oprofile

首先最好在Linux kernel里面选中Oprofile driver,以获得全面的支持。

下载Linux kernel Source:从https://github.com/Xilinx/linux-xlnx 可以下载到Xilinx提供的验证好的内核。如果不方便使用Linux下的git工具,可以单击页面上的releases找到相应的版本下载tar ball。下载的时候最好选tar.gz格式的,而不是zip格式的,因为后者在处理symbol link的时候有可能会出问题。

因为笔者使用的是Xilinx Linux pre-built 14.7,所以这里下载的是linux-xlnx-xilinx-v14.7.tar.gz

解压缩后,用以下命令调出Linux kernel的配置界面:

export ARCH=arm

export CROSS_COMPILE=arm-xilinx-linux-gnueabi-

make xilinx_zynq_defconfig

make xconfig 或者make menuconfig

在配置界面上将以下两项勾上:

General setup --->

[*] Profiling support

<*> OProfile system profiling

然后make uImage即可生成新的uImage,用来替换Xilinx Linux pre-built 14.7中的Linux kernel image。同时我们也需要vmlinux来检查profiling的结果。

Oprofile需要popt, bfd, liberty库,要在嵌入式单板上使用这些库,需要手工完成交叉编译。

针对popt 1.7,用以下命令完成编译:

./configure --prefix=/home/wave/xilinx/oprofileprj/rootfs --host=arm-xilinx-linux-gnueabi --with-kernel-support --disable-nls && make && make install

针对binutils 2.24,用以下命令完成编译:

./configure --host=arm-xilinx-linux-gnueabi --prefix=/home/wave/xilinx/oprofileprj/rootfs --enable-install-libbfd --enable-install-libiberty --enable-shared && make && make install

不过--enable-install-libiberty没有效果,所以需要手工把libiberty.a和libiberty.h拷贝到相应的位置。

针对oprofile 0.9.9,用以下命令完成编译:

./configure --host=arm-xilinx-linux-gnueabi --prefix=/home/wave/xilinx/oprofileprj/rootfs --with-kernel-support --with-binutils=/home/wave/xilinx/oprofileprj/rootfs && make && make install

配置过程结束后可能会有以下提示,因为没有打算用GUI和profile JITed code,所以直接忽视之。

config.status: executing libtool commands

Warning: QT version 3 was requested but not found. No GUI will be built.

Warning: The user account 'oprofile:oprofile' does not exist on the system.

To profile JITed code, this special user account must exist.

Please ask your system administrator to add the following user and group:

user name : 'oprofile'

group name: 'oprofile'

The 'oprofile' group must be the default group for the 'oprofile' user.

将编译完成的uImage,vmlinux,oprofile binary,重新编译的没有-pg的libjpeg binary以及tool chain的libc打包放到SD卡中,准备在ZC706开发板上尝试profile djpeg。

三. 运行Oprofile

正常启动嵌入式Linux后,在开发板的console上一次输入以下命令:

mount /dev/mmcblk0p1 /mnt

mkdir -p /home/root/work

cd /home/root/work

tar zxvf /mnt/jpeg-bin-nopg.tar.gz

cd jpeg-bin/bin

cp /mnt/park-2880x1800.jpg .

export LD_LIBRARY_PATH=/home/root/work/jpeg-bin/lib

cd /home/root/work

tar zxvf /mnt/rootfs.tar.gz

cd rootfs

chown root:root -R *

cp -R bin/* /usr/bin

cp -R lib/* /lib

cp /bin/which /usr/bin

cp /bin/dirname /usr/bin

mkdir -p /home/wave/xilinx/oprofileprj/rootfs/share

cp -R ./rootfs/* /home/wave/xilinx/oprofileprj/rootfs

cd /home/root/work

tar zxvf /mnt/libc.tar.gz

cp ./lib/libstdc*.* /lib

mkdir -p /home/wave/xilinx/libjpeg

cd /home/wave/xilinx/libjpeg

tar zxvf /mnt/jpeg-9.tar.gz

cp /mnt/vmlinux /home/root/work

cd /home/root/work/jpeg-bin/bin

opcontrol --init

opcontrol --vmlinux=/home/root/work/vmlinux

opcontrol --setup --event=CPU_CYCLES:100000::0:1 --session-dir=/home/root/

operf --vmlinux /home/root/work/vmlinux ./djpeg -bmp park-2880x1800.jpg > result.bmp

opreport -l ./djpeg

完成这一步后,我们就可以看到profiling的结果了,在笔者的平台上看到的内容的主要部分如下:

root@zynq:~/work/jpeg-bin/bin# opreport -l ./djpeg

Using /home/root/work/jpeg-bin/bin/oprofile_data/samples/ for samples directory.

CPU: ARM Cortex-A9, speed 666667 MHz (estimated)

Counted CPU_CYCLES events (CPU cycle) with a unit mask of 0x00 (No unit mask) count 100000

samples % image name symbol name

15293 58.6253 libc-2.17.so /lib/libc-2.17.so

2044 7.8356 libjpeg.so.9.0.0 ycc_rgb_convert

1964 7.5289 libjpeg.so.9.0.0 jpeg_idct_16x16

1918 7.3526 libjpeg.so.9.0.0 decode_mcu

1570 6.0186 libjpeg.so.9.0.0 jpeg_idct_islow

1567 6.0071 djpeg finish_output_bmp

528 2.0241 libjpeg.so.9.0.0 jpeg_fill_bit_buffer

397 1.5219 djpeg put_pixel_rows

73 0.2798 vmlinux ___from_user

70 0.2683 libjpeg.so.9.0.0 decompress_onepass

65 0.2492 libjpeg.so.9.0.0 jpeg_huff_decode

56 0.2147 vmlinux get_page_from_freelist

50 0.1917 vmlinux __memzero

45 0.1725 vmlinux ___to_user_std

41 0.1572 vmlinux _raw_spin_unlock_irqrestore

15 0.0575 vmlinux do_page_fault

14 0.0537 vmlinux __generic_file_aio_write

13 0.0498 vmlinux _raw_spin_unlock_irq

11 0.0422 vmlinux free_hot_cold_page

11 0.0422 vmlinux vector_swi

10 0.0383 vmlinux handle_pte_fault

从结果中我们可以看到libjpeg.so.9.0.0, djpeg和vmlinux中的symbol name已经可以被正确的解析出来了,和gprof的结果基本一致。相比gprof,oprofile可以在更大的范围内完成profiling。

我们还可以用以下命令观察源代码中特定行的执行时间,进一步缩小优化的范围,达到事半功倍的效果。

opannotate --source ./djpeg > opannotate.txt

四. 小结

通过实验,我们可以看到Oprofile可以提供更丰富的profiling结果,可以更好的帮助开发者找到瓶颈,通过有针对性的优化提升软件 性能;profiling的结果也可以帮助开发者将性能瓶颈代码通过Xilinx HLS工具用硬件加速器来实现,从而为进一步提升整个嵌入式系统的性能打开了大门。

阅读全文

与linuxjpeglibrary相关的资料

热点内容
轻松备份专业版教程 浏览:658
移动网络2g怎么改成4g 浏览:634
linux设置字体大小 浏览:329
安全牛的linux 浏览:672
wps会缓存excel文件么 浏览:592
app开发phpjava哪个更好 浏览:53
app有十万用户是什么概念 浏览:285
g73车球头怎么编程的 浏览:940
数据库管理的优点是 浏览:617
安卓毫秒计时器 浏览:92
hmci模组找不到文件 浏览:348
可复制日语qq网名 浏览:586
电信大数据平台 浏览:348
如何输出一个json数据 浏览:274
未来的编程语言是什么 浏览:694
编程上path是什么意思 浏览:683
u盘外壳3d源文件 浏览:298
中小学如何有效开展编程教育 浏览:6
如何快速拷贝大文件 浏览:406
正柏网络是什么 浏览:834

友情链接