700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > (已解决)编译ffmpeg时:/usr/bin/ld: cannot find crtbegin.o

(已解决)编译ffmpeg时:/usr/bin/ld: cannot find crtbegin.o

时间:2019-12-19 21:42:34

相关推荐

(已解决)编译ffmpeg时:/usr/bin/ld: cannot find crtbegin.o

问题如下

$ ./configure --enable-shared --prefix=/usr/local/ffmpeggcc is unable to create an executable file.If gcc is a cross-compiler, use the --enable-cross-compile option.Only do this if you know what cross compiling means.C compiler test failed.If you think configure made a mistake, make sure you are using the latestversion from Git. If the latest version fails, report the problem to theffmpeg-user@ mailing list or IRC #ffmpeg on .Include the log file "ffbuild/config.log" produced by configure as this will helpsolve the problem.

点开/ffbuild/config.log,查看出错信息,出错信息为如下所示

/usr/bin/ld: cannot find crtbegin.o: No such file or directory /usr/bin/ld: cannot find -lgcc /usr/bin/ld: cannot find -lgcc_s

直接原因:找不到crtbegin文件所致,间接原因:gcc未配置好(猜得),

故在/usr下查找crtbegin

$ sudo find /usr/ -name crtbegin*/usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o/usr/lib/gcc/x86_64-linux-gnu/7/crtbeginT.o/usr/lib/gcc/x86_64-linux-gnu/7/crtbegin.o/usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o/usr/lib/gcc/x86_64-linux-gnu/5/crtbeginT.o/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o

可以看出usr文件内含有该文件,只要增加一个路径即可

我按装了两个版本的gcc,一个为gcc-7.4,一个为gcc-5.4.0,目前正在使用的版本为5.4,所以路径应该为/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o

在ffmpeg目录下,打开终端

LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5:$LIBRARY_PATHexport LIBRARY_PATH

再./configure后即可成功

注:configure成功后,make,make install时可能会再出现如下问题:

/usr/bin/ld: cannot find crtbeginS.o: No such file or directorycollect2: error: ld returned 1 exit status

解决方案就是,打开bashrc,

LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5:$LIBRARY_PATHexport LIBRARY_PATH```把上面的路径再复制粘帖进去,重新make instal,大功告成!参考博客/happygogf/article/details/18147397```cpp$./configure --enable-shared --prefix=/usr/local/ffmpeginstall prefix /usr/local/ffmpegsource path.C compilergccC library glibcARCH x86 (generic)big-endiannoruntime cpu detectionyesstandalone assembly yesx86 assembler yasmMMX enabledyesMMXEXT enabled yes3DNow! enabled yes3DNow! extended enabled yesSSE enabledyesSSSE3 enabled yesAESNI enabled yesAVX enabledyesAVX2 enabled yesAVX-512 enabled yesXOP enabledyesFMA3 enabled yesFMA4 enabled yesi686 features enabledyesCMOV is fast yesEBX available yesEBP available yesdebug symbols yesstrip symbols yesoptimize for size nooptimizations yesstaticyessharedyespostprocessing support nonetwork support yesthreading support pthreadssafe bitstream readeryestexi2html enabled noperl enabled yespod2man enabled yesmakeinfo enabledyesmakeinfo supports HTML yesExternal libraries:alsa libxcb_shapesdl2bzlib libxcb_shmsndioiconv libxcb_xfixesxliblibxcb lzmazlibExternal libraries providing hardware acceleration:v4l2_m2m vaapivdpauLibraries:avcodec avformatswresampleavdevice avutilswscaleavfilterPrograms:ffmpeg ffplayffprobeEnabled decoders:aac atrac3pescape124aac_fixed atrac3palescape130aac_latm auraevrcaasc aura2exrac3 avrnffv1ac3_fixed avrpffvhuffadpcm_4xm avsffwavesynthadpcm_adx avuificadpcm_afc ayuvfitsadpcm_aica bethsoftvidflacadpcm_ct bfiflashsvadpcm_dtk binkflashsv2adpcm_ea binkaudio_dctflicadpcm_ea_maxis_xa binkaudio_rdftflvadpcm_ea_r1 bintextfmvcadpcm_ea_r2 bitpackedfourxmadpcm_ea_r3 bmpfrapsadpcm_ea_xas bmv_audiofrwuadpcm_g722 bmv_videog2madpcm_g726 brender_pixg723_1adpcm_g726le c93g729adpcm_ima_amv cavsgdvadpcm_ima_apc ccaptiongifadpcm_ima_dat4 cdgraphicsgremlin_dpcmadpcm_ima_dk3 cdxlgsmadpcm_ima_dk4 cfhdgsm_msadpcm_ima_ea_eacs cinepakh261adpcm_ima_ea_sead clearvideoh263adpcm_ima_iss cljrh263_v4l2m2madpcm_ima_oki cllch263iadpcm_ima_qt comfortnoiseh263padpcm_ima_rad cookh264adpcm_ima_smjpeg cpiah264_v4l2m2madpcm_ima_wav cscdhapadpcm_ima_ws cyuvhevcadpcm_ms dcahnm4_videoadpcm_mtaf ddshq_hqaadpcm_psx dfahqxadpcm_sbpro_2 dirachuffyuvadpcm_sbpro_3 dnxhdiacadpcm_sbpro_4 dolby_eidcinadpcm_swf dpxidfadpcm_thp dsd_lsbfiff_ilbmadpcm_thp_le dsd_lsbf_planarimcadpcm_vima dsd_msbfindeo2adpcm_xa dsd_msbf_planarindeo3adpcm_yamaha dsicinaudioindeo4aic dsicinvideoindeo5alac dss_spinterplay_acmalias_pix dstinterplay_dpcmals dvaudiointerplay_videoamrnb dvbsubjacosubamrwb dvdsubjpeg2000amv dvvideojpeglsanm dxajvansi dxtorykgv1ape dxvkmvcapng eac3lagarithaptx eacmvlocoaptx_hd eamadm101ass eatgqmace3asv1 eatgvmace6asv2 eatqimagicyuvatrac1 eightbpsmdecatrac3 eightsvx_expmetasoundatrac3al eightsvx_fibmicrodvdmimic pcm_s24lesmcmjpeg pcm_s24le_planarsmvjpegmjpegb pcm_s32besnowmlp pcm_s32lesol_dpcmmmvideo pcm_s32le_planarsonicmotionpixels pcm_s64besp5xmovtext pcm_s64lespeedhqmp1 pcm_s8srgcmp1float pcm_s8_planarsrtmp2 pcm_u16bessamp2float pcm_u16lestlmp3 pcm_u24besubripmp3adu pcm_u24lesubviewermp3adufloat pcm_u32besubviewer1mp3float pcm_u32lesunrastmp3on4 pcm_u8svq1mp3on4float pcm_zorksvq3mpc7 pcxtakmpc8 pgmtargampeg1_v4l2m2m pgmyuvtarga_y216mpeg1video pgssubtdscmpeg2_v4l2m2m pictortextmpeg2video pixlettheorampeg4 pjsthpmpeg4_v4l2m2m pngtiertexseqvideompegvideo ppmtiffmpl2 prorestmvmsa1 prores_lgpltruehdmscc psdtruemotion1msmpeg4v1 ptxtruemotion2msmpeg4v2 qcelptruemotion2rtmsmpeg4v3 qdm2truespeechmsrle qdmctsccmss1 qdrawtscc2mss2 qpegttamsvideo1 qtrletwinvqmszh r10ktxdmts2 r210ultimvc1 ra_144utvideomvc2 ra_288v210mxpeg ralfv210xnellymoser rawvideov308nuv realtextv408on2avc rl2v410opus roqvbpaf_audio roq_dpcmvblepaf_video rpzavc1pam rsccvc1_v4l2m2mpbm rv10vc1imagepcm_alaw rv20vcr1pcm_bluray rv30vmdaudiopcm_dvd rv40vmdvideopcm_f16le s302mvmncpcm_f24le samivorbispcm_f32be sanmvp3pcm_f32le sbcvp5pcm_f64be scprvp6pcm_f64le screenpressovp6apcm_lxf sdx2_dpcmvp6fpcm_mulaw sgivp7pcm_s16be sgirlevp8pcm_s16be_planar sheervideovp8_v4l2m2mpcm_s16le shortenvp9pcm_s16le_planar siprvp9_v4l2m2mpcm_s24be smackaudvplayerpcm_s24daud smackervqawavpack wnv1xpmwebp wrapped_avframexsubwebvtt ws_snd1xwdwmalossless xan_dpcmy41pwmapro xan_wc3ylcwmav1 xan_wc4yopwmav2 xbinyuv4wmavoice xbmzero12vwmv1 xfacezerocodecwmv2 xlzlibwmv3 xma1zmbvwmv3image xma2Enabled encoders:a64multi jpeg2000ppma64multi5 jpeglsproresaac ljpegprores_awac3 magicyuvprores_ksac3_fixed mjpegqtrleadpcm_adx mjpeg_vaapir10kadpcm_g722 mlpr210adpcm_g726 movtextra_144adpcm_g726le mp2rawvideoadpcm_ima_qt mp2fixedroqadpcm_ima_wav mpeg1videoroq_dpcmadpcm_ms mpeg2_vaapirv10adpcm_swf mpeg2videorv20adpcm_yamaha mpeg4s302malac mpeg4_v4l2m2msbcalias_pix msmpeg4v2sgiamv msmpeg4v3snowapng msvideo1sonicaptx nellymosersonic_lsaptx_hd opussrtass pamssaasv1 pbmsubripasv2 pcm_alawsunrastavrp pcm_f32besvq1avui pcm_f32letargaayuv pcm_f64betextbmp pcm_f64letiffcinepak pcm_mulawtruehdcljr pcm_s16bettacomfortnoise pcm_s16be_planarutvideodca pcm_s16lev210dnxhd pcm_s16le_planarv308dpx pcm_s24bev408dvbsub pcm_s24daudv410dvdsub pcm_s24levc2dvvideo pcm_s24le_planarvorbiseac3 pcm_s32bevp8_v4l2m2mffv1 pcm_s32levp8_vaapiffvhuff pcm_s32le_planarwavpackfits pcm_s64bewebvttflac pcm_s64lewmav1flashsv pcm_s8wmav2flashsv2 pcm_s8_planarwmv1flv pcm_u16bewmv2g723_1 pcm_u16lewrapped_avframegif pcm_u24bexbmh261 pcm_u24lexfaceh263 pcm_u32bexsubh263_v4l2m2m pcm_u32lexwdh263p pcm_u8y41ph264_v4l2m2m pcxyuv4h264_vaapi pgmzlibhevc_vaapi pgmyuvzmbvhuffyuv pngEnabled hwaccels:h263_vaapi mpeg1_vdpauvc1_vdpauh264_vaapi mpeg2_vaapivp8_vaapih264_vdpau mpeg2_vdpauvp9_vaapihevc_vaapi mpeg4_vaapiwmv3_vaapihevc_vdpau mpeg4_vdpauwmv3_vdpaumjpeg_vaapi vc1_vaapiEnabled parsers:aac dvdsubpngaac_latm flacpnmac3 g729rv30adx gsmrv40bmp h261sbccavsvideo h263siprcook h264takdca hevcvc1dirac mjpegvorbisdnxhd mlpvp3dpx mpeg4videovp8dvaudio mpegaudiovp9dvbsub mpegvideoxmadvd_nav opusEnabled demuxers:aa eac3jacosubaac epafjvac3 ffmetadatalive_flvacm filmstriplmlm4act fitsloasadf flaclrcadp fliclvfads flvlxfadx fourxmm4vaea frmmatroskaafc fsbmgstsaiff g722microdvdaix g723_1mjpegamr g726mjpeg_2000amrnb g726lemlpamrwb g729mlvanm gdvmmapc genhmmfape gifmovapng gsmmp3aptx gxfmpcaptx_hd h261mpc8aqtitle h263mpegpsasf h264mpegtsasf_o hevcmpegtsrawass hlsmpegvideoast hnmmpjpegau icompl2avi idcinmpsubavr idfmsfavs iffmsnwc_tcpbethsoftvid ilbcmtafbfi image2mtvbfstm image2_alias_pixmusxbink image2_brender_pixmvbintext image2pipemvibit image_bmp_pipemxfbmv image_dds_pipemxgboa image_dpx_pipencbrstm image_exr_pipenistspherec93 image_j2k_pipenspcaf image_jpeg_pipensvcavsvideo image_jpegls_pipenutcdg image_pam_pipenuvcdxl image_pbm_pipeoggcine image_pcx_pipeomacodec2 image_pgm_pipepafcodec2raw image_pgmyuv_pipepcm_alawconcat image_pictor_pipepcm_f32bedata image_png_pipepcm_f32ledaud image_ppm_pipepcm_f64bedcstr image_psd_pipepcm_f64ledfa image_qdraw_pipepcm_mulawdirac image_sgi_pipepcm_s16bednxhd image_sunrast_pipepcm_s16ledsf image_svg_pipepcm_s24bedsicin image_tiff_pipepcm_s24ledss image_webp_pipepcm_s32bedts image_xpm_pipepcm_s32ledtshd ingenientpcm_s8dv ipmoviepcm_u16bedvbsub ircampcm_u16ledvbtxt isspcm_u24bedxa iv8pcm_u24leea ivfpcm_u32beea_cdata ivrpcm_u32lepcm_u8 shortenv210xpjs siffvagpmp slnvc1pva smackervc1tpvf smjpegvivoqcp smushvmdr3d solvobsubrawvideo soxvocrealtext spdifvpkredspark srtvplayerrl2 stlvqfrm strw64roq subviewerwavrpl subviewer1wc3rsd supwebm_dash_manifestrso svagwebvttrtp swfwsaudrtsp takwsds337m tedcaptionswsvqasami thpwtvsap threedostrwvsbc tiertexseqwvesbg tmvxascc truehdxbinsdp ttaxmvsdr2 ttyxvagsds txdxwmasdx tyyopsegafilm v210yuv4mpegpipeEnabled muxers:a64 hlspcm_s24leac3 icopcm_s32beadts ilbcpcm_s32leadx image2pcm_s8aiff image2pipepcm_u16beamr ipodpcm_u16leapng ircampcm_u24beaptx ismvpcm_u24leaptx_hd ivfpcm_u32beasf jacosubpcm_u32leasf_stream latmpcm_u8ass lrcpspast m4vrawvideoau matroskarmavi matroska_audioroqavm2 md5rsobit microdvdrtpcaf mjpegrtp_mpegtscavsvideo mkvtimestamp_v2rtspcodec2 mlpsapcodec2raw mmfsbccrc movsccdash mp2segafilmdata mp3segmentdaud mp4singlejpegdirac mpeg1systemsmjpegdnxhd mpeg1vcdsmoothstreamingdts mpeg1videosoxdv mpeg2dvdspdifeac3 mpeg2svcdspxf4v mpeg2videosrtffmetadata mpeg2vobstream_segmentfifo mpegtssupfifo_test mpjpegswffilmstrip mxfteefits mxf_d10tg2flac mxf_opatomtgpflv nulltruehdframecrc nutttaframehash ogauncodedframecrcframemd5 oggvc1g722 ogvvc1tg723_1 omavocg726 opusw64g726le pcm_alawwavgif pcm_f32bewebmgsm pcm_f32lewebm_chunkgxf pcm_f64bewebm_dash_manifesth261 pcm_f64lewebph263 pcm_mulawwebvtth264 pcm_s16bewtvhash pcm_s16lewvhds pcm_s24beyuv4mpegpipehevcEnabled protocols:async httprtmptcache httpproxyrtpconcat icecastsrtpcrypto md5subfiledata mmshtcpffrtmphttp mmstteefile pipeudpftp prompegudplitegopher rtmpunixhlsEnabled filters:abench benchfifoabitscope biquadfillbordersacompressor bitplanenoisefirequalizeracontrast blackdetectflangeracopy blendfloodfillacrossfade bwdifformatacrusher cellautofpsadelay channelmapframepackadrawgraph channelsplitframerateaecho chorusframestepaemphasis chromakeygbluraeval ciescopegradfunaevalsrc codecviewhaasafade colorhaldclutafftfilt colorbalancehaldclutsrcafifo colorchannelmixerhdcdafir colorkeyheadphoneaformat colorlevelshflipagate colorspacehighpassahistogram compandhilbertaiir compensationdelayhistogramainterleave concathqxalimiter convolutionhstackallpass convolvehueallrgb copyhwdownloadallyuv crophwmapaloop crossfeedhwuploadalphaextract crystalizerhysteresisalphamerge curvesidetamerge datascopeilametadata dcshiftinflateamix dctdnoizinterleaveamovie debandjoinanequalizer decimatelenscorrectionanoisesrc deconvolvelifeanull deflatelimiteranullsink deflickerloopanullsrc deinterlace_vaapiloudnormapad dejudderlowpassaperms denoise_vaapilumakeyaphasemeter deshakelutaphaser despilllut2apulsator detelecinelut3darealtime dilationlutrgbaresample displacelutyuvareverse doubleweavemandelbrotaselect drawboxmaskedclampasendcmd drawgraphmaskedmergeasetnsamples drawgridmcompandasetpts drmetermergeplanesasetrate dynaudnormmestimateasettb earwaxmetadataashowinfo ebur128midequalizerasidedata edgedetectminterpolateasplit elbgmixastats entropymovieastreamselect equalizernegateatadenoise erosionnlmeansatempo extractplanesnoformatatrim extrastereonoiseavectorscope fadenormalizeavgblur fftfiltnullbandpass fieldnullsinkbandreject fieldhintnullsrcbass fieldmatchoscilloscopebbox fieldorderoverlaypad setptsswaprectpalettegen setrangeswapuvpaletteuse setsartblendpan settbtelecineperms sharpness_vaapitestsrcpixdesctest showcqttestsrc2pixscope showfreqsthresholdpremultiply showinfothumbnailprewitt showpalettetileprocamp_vaapi showspectrumtlut2pseudocolor showspectrumpictonemappsnr showvolumetransposeqp showwavestreblerandom showwavespictremoloreadeia608 shuffleframestrimreadvitc shuffleplanesunpremultiplyrealtime sidechaincompressunsharpremap sidechaingatevectorscoperemovegrain sidedatavflipremovelogo signalstatsvfrdetreplaygain silencedetectvibratoreverse silenceremovevignettergbtestsrc sinevmafmotionroberts smptebarsvolumerotate smptehdbarsvolumedetectscale sobelvstackscale2ref spectrumsynthw3fdifscale_vaapi splitwaveformselect ssimweaveselectivecolor stereotoolsxbrsendcmd stereowidenyadifseparatefields streamselectyuvtestsrcsetdar superequalizerzoompansetfield surroundEnabled bsfs:aac_adtstoasc hapqa_extractmpeg4_unpack_bframeschomp hevc_metadatanoisedca_core hevc_mp4toannexbnulldump_extradata imx_dump_headerremove_extradataeac3_core mjpeg2jpegtext2movsubextract_extradata mjpega_dump_headertrace_headersfilter_units mov2textsubvp9_raw_reorderh264_metadata mp3_header_decompressvp9_superframeh264_mp4toannexb mpeg2_metadatavp9_superframe_splith264_redundant_ppsEnabled indevs:alsa ossv4l2fbdev sndioxcbgrablavfiEnabled outdevs:alsa sdl2v4l2fbdev sndioxvossLicense: LGPL version 2.1 or laterconfig.asm is unchangedlibavutil/avconfig.h is unchangedlibavfilter/filter_list.c is unchangedlibavcodec/codec_list.c is unchangedlibavcodec/parser_list.c is unchangedlibavcodec/bsf_list.c is unchangedlibavformat/demuxer_list.c is unchangedlibavformat/muxer_list.c is unchangedlibavdevice/indev_list.c is unchangedlibavdevice/outdev_list.c is unchangedlibavformat/protocol_list.c is unchangedffbuild/config.sh is unchanged```

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。